Function findRecordsByFilter
- findRecordsByFilter(collectionModelOrIdentifier, filter, sort, limit, offset, ...params): core.Record[]
-
Parameters
-
collectionModelOrIdentifier: any
-
filter: string
-
sort: string
-
limit: number
-
offset: number
-
Rest
...params: Params[]
FindRecordsByFilter returns limit number of records matching the provided string filter.
NB! Use the last "params" argument to bind untrusted user variables!
The filter argument is optional and can be empty string to target all available records.
The sort argument is optional and can be empty string OR the same format used in the web APIs, ex. "-created,title".
If the limit argument is <= 0, no limit is applied to the query and all matching records are returned.
Returns an empty slice if no records are found.
Example: