Open rkosafo opened 7 years ago
Given the query
type UserCount = SQL<"Select count(*) as cnt from Users">
UserCount.Command has signature Command<IReadOnlyList<Row>>
UserCount.Command
Command<IReadOnlyList<Row>>
Is there a way to write the query such that the output is Command<Row> so .Scalar() can be called on it instead of .Plan() or .ExactlyOne()?
Command<Row>
.Scalar()
.Plan()
.ExactlyOne()
Currently using .ExactlyOne() though.
Right now, no way to do it. However it shouldn't be too hard to add this type of query (aggregates in the select clause, no group by, no limit) to the ones that get detected as single-row queries.
Given the query
UserCount.Command
has signatureCommand<IReadOnlyList<Row>>
Is there a way to write the query such that the output is
Command<Row>
so.Scalar()
can be called on it instead of.Plan()
or.ExactlyOne()
?Currently using
.ExactlyOne()
though.