Class: queryHandlers

QuickNav

queryHandlers

Contains out of the box query handlers.

Methods

(static) getOracleRestQueryHandler(storeName, createQueryExp, dataMapping) → {Function}

Returns the Oracle Rest Query Handler which handles the query parameters according to the Oracle Rest Specification. Note the Oracle Rest Specification requires queries to be specified in the q parameter e.g. ?q= but does not enforce a particular format for the query itself. Therefore this API takes a parameter createQueryExp where the developer can plugin a function which takes the parameter value and returns a persistence store query. If none if provided then the default is to use the ADFBc REST query parameter structure which has the form: ?q=EmpId=100. Offline supports the following ADFBc operators in the expression: >, <, >=, <=, =, !=, AND, OR, LIKE, IN. In addition, the query handler supports the limit and offset query parameters used for paging in the Oracle REST specification.
Parameters:
Name Type Argument Description
storeName string The store name against which queries should be executed
createQueryExp function <optional>
Optional function takes URL query parameters and returns a query expression which will be executed against the persistent store. If null then use the ADFBc REST query parameter structure.
dataMapping DataMapping <optional>
Optional dataMapping to apply to the data
Returns:
Returns the query handler
Type
function

(static) getSimpleQueryHandler(storeName, ignoreUrlParams, dataMapping) → {Function}

Returns the Simple Query Handler which matches the URL query parameter/value pairs against the store's field/value pairs.
Parameters:
Name Type Argument Description
storeName string The store name against which queries should be executed
ignoreUrlParams Array <optional>
An array of URL params to be ignored
dataMapping DataMapping <optional>
Optional dataMapping to apply to the data
Returns:
Returns the query handler
Type
function