Return the count of instances in the DB for the given entity name. You can also pass an optional where statement that can filter the count. Ex: count('User','age > 40 AND name="joe"'). You can even use named or positional parameters with this method: Ex: count('User','age > ? AND name = ?',[40,"joe"])
This function returns numeric
Key
Type
Required
Default
Description
entityName
string
Yes
---
where
string
No
params
any
No
strucnew()
Named or positional parameters
These methods allow you to do counting on entities with or without filtering.
Returns the count by passing name value pairs as arguments to this function. One mandatory argument is to pass the 'entityName'. The rest of the arguments are used in the where class using AND notation and parameterized. Ex: countWhere(entityName="User",age="20");
This function returns numeric
Key
Type
Required
Default
Description
entityName
any
Yes
---
id
any
Yes
---
Key
Type
Required
Default
entityName
string
Yes
---