Class: queryHandlers

queryHandlers

Contains out of the box query handlers.

Methods

(static) getOracleRestQueryHandler(storeName, createQueryExpopt) → {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 In addition, the query handler supports the limit and offset query parameters used for paging in the Oracle REST specification.
Parameters:
Name Type Attributes 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.
Source:
Returns:
Returns the query handler
Type
function

(static) getSimpleQueryHandler(storeName, ignoreUrlParams) → {function}

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