Skip to content

Commit 5c2c91c

Browse files
committed
Fixed compilation errors on RelationMixin
``` ../dpq/source/dpq/relationproxy.d(382,58): Error: cannot implicitly convert expression `((Row __dop7675 = result.opIndex(0);) , __dop7675.opIndex("id")).as()` of type `Nullable!long` to `long` ../dpq/source/dpq/relationproxy.d(434,26): Error: cannot implicitly convert expression `((Row __dop7707 = result.opIndex(0);) , __dop7707.opIndex(0)).as()` of type `Nullable!long` to `long` ```
1 parent f9c08a9 commit 5c2c91c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/dpq/relationproxy.d

+2-2
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ struct RelationProxy(T)
381381

382382
alias pkMem = Alias!(__traits(getMember, record, pk));
383383
auto result = qb.query(_connection).run();
384-
__traits(getMember, record, pk) = result[0][pkAttr].as!(typeof(pkMem));
384+
__traits(getMember, record, pk) = result[0][pkAttr].as!(typeof(pkMem)).get;
385385

386386
return record;
387387
}
@@ -433,7 +433,7 @@ struct RelationProxy(T)
433433
.select("count(%s)".format(col));
434434

435435
auto result = qb.query(_connection).run();
436-
return result[0][0].as!long;
436+
return result[0][0].as!long().get;
437437
}
438438

439439
/**

0 commit comments

Comments
 (0)