Rezoom.SQL
Rezoom.SQL copied to clipboard
Single row queries
Given the query
type UserCount = SQL<"Select count(*) as cnt from Users">
UserCount.Command has signature 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()?
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.