Class KiiQuery
Represents a KiiQuery object
Defined in: KiiSDK.js.
Constructor Attributes | Constructor Name and Description |
---|---|
KiiQuery()
|
Method Attributes | Method Name and Description |
---|---|
getLimit()
Get the limit of the current query
|
|
<static> |
KiiQuery.queryWithClause(clause)
Create a KiiQuery object based on a KiiClause
By passing null as the ‘clause’ parameter, all objects can be retrieved. |
setLimit(value)
Set the limit of the given query
|
|
sortByAsc(field)
Set the query to sort by a field in ascending order
If a sort has already been set, it will be overwritten.
|
|
sortByDesc(field)
Set the query to sort by a field in descending order
If a sort has already been set, it will be overwritten.
|
Method Detail
{Number}
getLimit()
Get the limit of the current query
- Returns:
- {Number}
<static>
KiiQuery.queryWithClause(clause)
Create a KiiQuery object based on a KiiClause
By passing null as the ‘clause’ parameter, all objects can be retrieved.
By passing null as the ‘clause’ parameter, all objects can be retrieved.
- Parameters:
- clause
- The KiiClause to be executed with the query
setLimit(value)
Set the limit of the given query
- Parameters:
- value
- The desired limit. Must be an integer > 0
- Throws:
- InvalidLimitException
sortByAsc(field)
Set the query to sort by a field in ascending order
If a sort has already been set, it will be overwritten.
- Parameters:
- {String} field
- The key that should be used to sort
sortByDesc(field)
Set the query to sort by a field in descending order
If a sort has already been set, it will be overwritten.
- Parameters:
- {String} field
- The key that should be used to sort