count
Return the number of records in a query.
queryLogic.count(query)
Returns the number of records that might be loaded by the query. This returns infinity unless
a page is provided.
import {QueryLogic} from "can";
const queryLogic = new QueryLogic();
const count = queryLogic.count({page: {start: 10, end: 19}});
console.log( count ); //-> 10
Parameters
- query
{Query}:A query representing a set of data.
Returns
{Number}:
The number of records in the query if known, Infinity
if unknown.