Create the store.
allows overwrite of any property
the fetch method to use. Provided to customize in the constructor to make tests easier.
Defines the Accept header to use on HTTP requests
The jsonp request parameter
The filter param transporting the query.
Additional headers to pass in all requests to the server. These can be overridden by passing additional headers to calls to the store.
The id of this store.
Indicates the property to use as the identity property. The values of this property should be unique.
Identifies the item array in query responses
Shall jsonp used for get and query
Configuration option for getMetadata method.
Range parameter transporting item range definitions.
The query parameter to used for holding sort information. If this is omitted, than the sort information is included in a functional query token to avoid colliding with the set of name/value pairs.
Flag which indicates that an switching to POST is allowed when GET requests are to long. This is true by default for backwards compatibility.
The target base URL to use for all requests to the server. This string will be prepended to the id to generate the URL (relative or absolute) for requests sent to the server
Identifies the total property in query responses
Protected
_metadataProperty for sub classes which provide static pre-configured metadata template.
Adds an object. This will trigger a POST request to the server if the object has no id. If it has an id a PUT request is executed. It is much the same as the put method. You can suppress the switching to put by marking the id as undefined in the options.
Optional
options: CreateOptions<IDType> & RequestOptionsconst item = { id: 1, name : "hello"};
// this will still execute a POST request
store.add(item, {id: undefined});
Retrieves an item from this store.
the id.
customization options.
an item.
Executes a PUT HTTP request if an id is provided in the item or the options. Executes a POST HTTP request if no id is provided.
data to send to the backend.
Optional
options: CreateOptions<IDType> & RequestOptionsadditional options.
the result of the server, normally the new created/updated item.
Queries the store for objects.
Optional
query: ComplexQueryExpressionDeletes an object by its identity. This will trigger a DELETE request to the server.
Optional
options: CreateOptions<IDType> & RequestOptionsProtected
_appendConverts the options.start and options.count values to request parameters.
By default the headers "Range" and "X-Range" are calculated and
the request parameter 'range' is added.
A range is an string like '5..20' == ${start}-${start+count-1}
.
request parameters will be changed
the query options, with start + count.
Protected
_appendConverts the options.sort to request parameters. By default the sort options are converted into 'sort' request parameter, like '-id,+name,+title'.
request parameters to change.
the query options.
Protected
_executeProtected
_filterProtected
_filterHook for sub classes to add/change request parameters.
Protected
_getProtected
_processTransforms server responses into ResultItems<T>
.
The default implementation expects a server response of this format:
{
total : <count>,
items: [...]
}
json server response
ResultItems.
Generated using TypeDoc
RQL Store is a RestStore which uses the RQL language as query language. RQL stands for REST Query Language and is a simple filter expression language used by backend services of map.apps. E.g. AppService, AppTemplateService, ReportingService and JSRegistryBundlesServices is using this filter language. The RQLStore transforms the ComplexQueryExpressions into RQL filter expressions.