Connection.count

Returns a count of the rows matching the filter in the specified relation. Filter can be empty or not given to select a count of all the rows in the relation.

struct Connection
long
count
(
T
U...
)
(
string filter = ""
,
U vals = U.init
)

Examples

Connection c; // An established connection
struct User {@PK @serial int id; int a }
long nUsers = c.count!User;
nUsers = c.count!User("id > $1", 123);

Meta