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 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
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.
Optionaloptions: CreateOptions<IDType> & RequestOptionsRetrieves 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.
Optionaloptions: CreateOptions<IDType> & RequestOptionsadditional options.
the result of the server, normally the new created/updated item.
Queries the store for objects.
Optionalquery: ComplexQueryExpressionDeletes an object by its identity. This will trigger a DELETE request to the server.
Optionaloptions: CreateOptions<IDType> & RequestOptionsProtected_appendHook for subclasses to convert ComplexQueryExpression into request parameters.
prepared request parameters
the complex query
the query options
Protected_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_executeHelper method which checks the query options and delegates to fetch.
http method to execute.
the request options.
result of the request.
Protected_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.
Extends the Base Store implementation with write methods (put/add/delete).