You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optional additional query clauses. Can be Callback—a callback function that recieves the underlying SelectStatement instance for manipulation.
Usage
Call patterns
Count on all columns:
// COUNT *constrowCount=awaittable.count();
Count on a column:
// Number of rows where column_1 isn't nullconstrowCount=awaittable.count('column_1');
Add filters:
// Number of rows where column_1 isn't null and the extra conditions are also satisfiedconstrowCount=awaittable.count(['column_1'],{where: {eq: ['col1',{value: 'val1'}]}});
// Number of rows where conditions are satisfiedconstrowCount=awaittable.count({where: {eq: ['col1',{value: 'val1'}]}});