Query actions
List and explanation of JSON DB API actions for querying data
List and explanation of the "getRecords..."
actions in the JSON DB API, which query data in FairCom database tables. Each action is a specific technique optimized to find and retrieve records quickly and efficiently. These actions work for all FairCom products that include the FairCom database engine.
Get data
These actions are part of the JSON DB API. This section provides actions to query records in tables. Most actions can directly return data or return a cursor that you can use to paginate forward and backward through the records. You can look up records by ID, find records that most closely match a key, retrieve all records in a table, retrieve records in index order, retrieve records within a key range, and retrieve records returned by a SQL query. These actions work with all tables, including FairCom Edge's integration tables.
Action | Description |
---|---|
| |
This action treats a table as a simple key-value store when the primary key is the This action is the fastest way to retrieve records by ID or a multi-field primary key. | |
This action can also efficiently return all records in one call when the table contains tens of thousands of records. The records can be sorted forward or backward in index order. | |
This action can efficiently return all matching records in one call, which is helpful for typeahead queries. The records are sorted forward or backward in index order. It can also return a cursor when you expect matching records to exceed tens of thousands of records. | |
This action is the fastest way to retrieve all records in a table in one call. It can also return a forward-only cursor for paginating through tables containing more than tens of thousands of records. | |
This action is the fastest way to paginate through records, tail the last N records, repeatedly read the same N records, skip records, and fetch records forward or backward. Both skip and fetch can move forward or backward in any combination, such as skipping ahead and fetching backward. Some actions create forward-only cursors. | |
This action is the fastest way to retrieve a bounded set of records in index order. Use this action to treat a table as a hierarchical-key-value store. Use | |
This action is the fastest way to start at a specific key and walk records in index order. It is typically used to look up records that are near a key. It can also retrieve records before and after a key value. | |
This action is the fastest way to join tables, run complex filters, sort data using unindexed fields, and run analytic queries. |
Tip
When you want to paginate through the query results, return a cursor from a "getRecords..."
action and call the "getRecordsFromCursor"
action repeatedly until the "moreRecords"
property is false.
Note
For various reasons, the "moreRecords"
property may be true
when no more records exist. An application should handle the case when the "getRecordsFromCursor"
action returns no records.