Persistent resources for the web services module.
Requires
Classes
Mixins
Members
-
<static> AUTOASSIGNED
-
Validators to use on auto-assigned required properties in the record types library definition. When a new record is created, requires the property to be empty. When the record is being updated, requires the property to have value.
-
<static> OPTIONALLY_AUTOASSIGNED
-
Validators to use on optionally auto-assigned required properties in the record types library definition. When a new record is created, the property is allowed to be empty or not. When the record is being updated, requires the property to have value.
Methods
-
<static> createResourceHandlersFactory(ds, dboFactory [, defaultOptions])
-
Create resource handlers factory.
Parameters:
Name Type Argument Description dsmodule:x2node-dbos.DataSource Data source. dboFactorymodule:x2node-dbos~DBOFactory DBO factory. defaultOptionsObject <optional>
Default options for handlers. -
<static> parseSearchQuery(recordTypeDesc, urlQuery, queryParts, queryParams)
-
Parse URL query parameters used for collection search requests into a fetch DBO query specification.
Parameters:
Name Type Description recordTypeDescmodule:x2node-records~RecordTypeDescriptor Descriptor of the record type being queried. urlQueryObject URL query parameters. queryPartsstring Query parts to include in parsing. A line of characters including "p", "f", "o" and "r". queryParamsObject.<string, *> Fetch query parameters to populate. Throws:
-
If query parameters are invalid.
- Type
- common.X2SyntaxError
Returns:
Fetch DBO query specification, ornullif invalid URL query parameters.- Type
- Object
-
Type Definitions
-
CreateTransactionContext
-
Context object for a new record creation operation.
Type:
Properties:
Name Type Argument Description recordTmplObject parentQuerySpecObject <optional>
parentQueryParamsObject <optional>
parentRecordObject <optional>
-
DeleteTransactionContext
-
Context object for a record deletion operation.
Type:
Properties:
Name Type Argument Description selectionFilterObject queryParamsObject.<string, *> fetchPropsArray.<string> <optional>
recordObject <optional>
referredRecordsObject <optional>
deleteResultmodule:x2node-dbos~DeleteDBO~Result -
ReadTransactionContext
-
Context object for a single record read operation.
Type:
Properties:
Name Type Argument Description querySpecObject queryParamsObject.<string, *> referredRecordsObject <optional>
-
SearchTransactionContext
-
Context object for a record search operation.
Type:
Properties:
Name Type Description querySpecObject Query specification built from the search parameters. Can be modified by the hook. queryParamsObject.<string, *> -
UpdateTransactionContext
-
Context object for a record update operation.
Type:
Properties:
Name Type Description patchSpecObject patchmodule:x2node-patches~RecordPatch prefetchQuerySpecObject prefetchQueryParamsObject.<string, *> updateResultmodule:x2node-dbos~UpdateDBO~Result