<abstract> new Adapter(opts)
Abstract class meant to be extended by adapters.
Name | Type | Argument | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object |
<optional> |
Configuration opts. Properties
|
Source |
---|
node_modules/js-data-adapter/src/index.js, line 55 |
Members
-
debug
-
Whether to log debugging information.
DetailsType Default value Source Boolean false
node_modules/js-data-adapter/src/index.js, line 36 -
raw
-
Whether to return a more detailed response object.
DetailsType Default value Source Boolean false
node_modules/js-data-adapter/src/index.js, line 45
Methods
-
<static> extend(instanceProps, classProps)
-
Alternative to ES6 class syntax for extending
Adapter
.Method parameters:Name Type Argument Description instanceProps
Object <optional>
Properties that will be added to the prototype of the subclass.
classProps
Object <optional>
Properties that will be added as static properties to the subclass itself.
Return value:Type Description Object Subclass of
Adapter
.DetailsSource node_modules/js-data-adapter/src/index.js, line 110 -
afterCount(mapper, props, opts, response)
-
Lifecycle method method called by count.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes count to wait for the Promise to resolve before continuing.
If
opts.raw
istrue
thenresponse
will be a detailed response object, otherwiseresponse
will be the count.response
may be modified. You can also re-assignresponse
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by count.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to count.props
Object The
props
argument passed to count.opts
Object The
opts
argument passed to count.response
Object | Response Count or Response, depending on the value of
opts.raw
.DetailsSource node_modules/js-data-adapter/src/index.js, line 124 Properties:
Name Type Description opts.op
String afterCount
-
afterCreate(mapper, props, opts, response)
-
Lifecycle method method called by create.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes create to wait for the Promise to resolve before continuing.
If
opts.raw
istrue
thenresponse
will be a detailed response object, otherwiseresponse
will be the created record.response
may be modified. You can also re-assignresponse
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by create.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to create.props
Object The
props
argument passed to create.opts
Object The
opts
argument passed to create.response
Object | Response Created record or Response, depending on the value of
opts.raw
.DetailsSource node_modules/js-data-adapter/src/index.js, line 147 Properties:
Name Type Description opts.op
String afterCreate
-
afterCreate(mapper, props, opts, response)
-
Lifecycle method method called by createMany.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes createMany to wait for the Promise to resolve before continuing.
If
opts.raw
istrue
thenresponse
will be a detailed response object, otherwiseresponse
will be the created records.response
may be modified. You can also re-assignresponse
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to createMany.props
Array.<Object> The
props
argument passed to createMany.opts
Object The
opts
argument passed to createMany.response
Array.<Object> | Response Created records or Response, depending on the value of
opts.raw
.DetailsSource node_modules/js-data-adapter/src/index.js, line 170 Properties:
Name Type Description opts.op
String afterCreateMany
-
afterDestroy(mapper, id, opts, response)
-
Lifecycle method method called by destroy.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes destroy to wait for the Promise to resolve before continuing.
If
opts.raw
istrue
thenresponse
will be a detailed response object, otherwiseresponse
will beundefined
.response
may be modified. You can also re-assignresponse
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to destroy.id
String | Number The
id
argument passed to destroy.opts
Object The
opts
argument passed to destroy.response
undefined | Response undefined
or Response, depending on the value ofopts.raw
.DetailsSource node_modules/js-data-adapter/src/index.js, line 193 Properties:
Name Type Description opts.op
String afterDestroy
-
afterDestroyAll(mapper, query, opts, response)
-
Lifecycle method method called by destroyAll.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.
If
opts.raw
istrue
thenresponse
will be a detailed response object, otherwiseresponse
will beundefined
.response
may be modified. You can also re-assignresponse
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to destroyAll.query
Object The
query
argument passed to destroyAll.opts
Object The
opts
argument passed to destroyAll.response
undefined | Response undefined
or Response, depending on the value ofopts.raw
.DetailsSource node_modules/js-data-adapter/src/index.js, line 216 Properties:
Name Type Description opts.op
String afterDestroyAll
-
afterFind(mapper, id, opts, response)
-
Lifecycle method method called by find.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes find to wait for the Promise to resolve before continuing.
If
opts.raw
istrue
thenresponse
will be a detailed response object, otherwiseresponse
will be the found record, if any.response
may be modified. You can also re-assignresponse
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by find.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to find.id
String | Number The
id
argument passed to find.opts
Object The
opts
argument passed to find.response
Object | Response The found record or Response, depending on the value of
opts.raw
.DetailsSource node_modules/js-data-adapter/src/index.js, line 239 Properties:
Name Type Description opts.op
String afterFind
-
afterFindAll(mapper, query, opts, response)
-
Lifecycle method method called by findAll.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes findAll to wait for the Promise to resolve before continuing.
If
opts.raw
istrue
thenresponse
will be a detailed response object, otherwiseresponse
will be the found records, if any.response
may be modified. You can also re-assignresponse
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to findAll.query
Object The
query
argument passed to findAll.opts
Object The
opts
argument passed to findAll.response
Array.<Object> | Response The found records or Response, depending on the value of
opts.raw
.DetailsSource node_modules/js-data-adapter/src/index.js, line 262 Properties:
Name Type Description opts.op
String afterFindAll
-
afterSum(mapper, field, query, opts, response)
-
Lifecycle method method called by sum.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes sum to wait for the Promise to resolve before continuing.
If
opts.raw
istrue
thenresponse
will be a detailed response object, otherwiseresponse
will be the sum.response
may be modified. You can also re-assignresponse
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to sum.field
String The
field
argument passed to sum.query
Object The
query
argument passed to sum.opts
Object The
opts
argument passed to sum.response
Object | Response Count or Response, depending on the value of
opts.raw
.DetailsSource node_modules/js-data-adapter/src/index.js, line 285 Properties:
Name Type Description opts.op
String afterSum
-
afterUpdate(mapper, id, props, opts, response)
-
Lifecycle method method called by update.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes update to wait for the Promise to resolve before continuing.
If
opts.raw
istrue
thenresponse
will be a detailed response object, otherwiseresponse
will be the updated record.response
may be modified. You can also re-assignresponse
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by update.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to update.id
String | Number The
id
argument passed to update.props
Object The
props
argument passed to update.opts
Object The
opts
argument passed to update.response
Object | Response The updated record or Response, depending on the value of
opts.raw
.DetailsSource node_modules/js-data-adapter/src/index.js, line 309 Properties:
Name Type Description opts.op
String afterUpdate
-
afterUpdateAll(mapper, props, query, opts, response)
-
Lifecycle method method called by updateAll.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.
If
opts.raw
istrue
thenresponse
will be a detailed response object, otherwiseresponse
will be the updated records, if any.response
may be modified. You can also re-assignresponse
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to updateAll.props
Object The
props
argument passed to updateAll.query
Object The
query
argument passed to updateAll.opts
Object The
opts
argument passed to updateAll.response
Array.<Object> | Response The updated records or Response, depending on the value of
opts.raw
.DetailsSource node_modules/js-data-adapter/src/index.js, line 333 Properties:
Name Type Description opts.op
String afterUpdateAll
-
afterUpdateMany(mapper, records, opts, response)
-
Lifecycle method method called by updateMany.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.
If
opts.raw
istrue
thenresponse
will be a detailed response object, otherwiseresponse
will be the updated records, if any.response
may be modified. You can also re-assignresponse
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to updateMany.records
Array.<Object> The
records
argument passed to updateMany.opts
Object The
opts
argument passed to updateMany.response
Array.<Object> | Response The updated records or Response, depending on the value of
opts.raw
.DetailsSource node_modules/js-data-adapter/src/index.js, line 357 Properties:
Name Type Description opts.op
String afterUpdateMany
-
beforeCount(mapper, query, opts)
-
Lifecycle method method called by count.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes count to wait for the Promise to resolve before continuing.
A thrown error or rejected Promise will bubble up and reject the Promise returned by count.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to count.query
Object The
query
argument passed to count.opts
Object The
opts
argument passed to count.DetailsSource node_modules/js-data-adapter/src/index.js, line 380 Properties:
Name Type Description opts.op
String beforeCount
-
beforeCreate(mapper, props, opts)
-
Lifecycle method method called by create.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes create to wait for the Promise to resolve before continuing.
props
may be modified. You can also re-assignprops
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by create.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to create.props
Object The
props
argument passed to create.opts
Object The
opts
argument passed to create.DetailsSource node_modules/js-data-adapter/src/index.js, line 398 Properties:
Name Type Description opts.op
String beforeCreate
-
beforeCreateMany(mapper, props, opts)
-
Lifecycle method method called by createMany.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes createMany to wait for the Promise to resolve before continuing.
props
may be modified. You can also re-assignprops
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by createMany.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to createMany.props
Array.<Object> The
props
argument passed to createMany.opts
Object The
opts
argument passed to createMany.DetailsSource node_modules/js-data-adapter/src/index.js, line 418 Properties:
Name Type Description opts.op
String beforeCreateMany
-
beforeDestroy(mapper, id, opts)
-
Lifecycle method method called by destroy.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes destroy to wait for the Promise to resolve before continuing.
A thrown error or rejected Promise will bubble up and reject the Promise returned by destroy.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to destroy.id
String | Number The
id
argument passed to destroy.opts
Object The
opts
argument passed to destroy.DetailsSource node_modules/js-data-adapter/src/index.js, line 438 Properties:
Name Type Description opts.op
String beforeDestroy
-
beforeDestroyAll(mapper, query, opts)
-
Lifecycle method method called by destroyAll.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes destroyAll to wait for the Promise to resolve before continuing.
A thrown error or rejected Promise will bubble up and reject the Promise returned by destroyAll.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to destroyAll.query
Object The
query
argument passed to destroyAll.opts
Object The
opts
argument passed to destroyAll.DetailsSource node_modules/js-data-adapter/src/index.js, line 456 Properties:
Name Type Description opts.op
String beforeDestroyAll
-
beforeFind(mapper, id, opts)
-
Lifecycle method method called by find.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes find to wait for the Promise to resolve before continuing.
A thrown error or rejected Promise will bubble up and reject the Promise returned by find.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to find.id
String | Number The
id
argument passed to find.opts
Object The
opts
argument passed to find.DetailsSource node_modules/js-data-adapter/src/index.js, line 474 Properties:
Name Type Description opts.op
String beforeFind
-
beforeFindAll(mapper, query, opts)
-
Lifecycle method method called by findAll.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes findAll to wait for the Promise to resolve before continuing.
A thrown error or rejected Promise will bubble up and reject the Promise returned by findAll.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to findAll.query
Object The
query
argument passed to findAll.opts
Object The
opts
argument passed to findAll.DetailsSource node_modules/js-data-adapter/src/index.js, line 492 Properties:
Name Type Description opts.op
String beforeFindAll
-
beforeSum(mapper, query, opts)
-
Lifecycle method method called by sum.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes sum to wait for the Promise to resolve before continuing.
A thrown error or rejected Promise will bubble up and reject the Promise returned by sum.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to sum.query
Object The
query
argument passed to sum.opts
Object The
opts
argument passed to sum.DetailsSource node_modules/js-data-adapter/src/index.js, line 510 Properties:
Name Type Description opts.op
String beforeSum
-
beforeUpdate(mapper, id, props, opts)
-
Lifecycle method method called by update.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes update to wait for the Promise to resolve before continuing.
props
may be modified. You can also re-assignprops
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by update.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to update.id
String | Number The
id
argument passed to update.props
Object The
props
argument passed to update.opts
Object The
opts
argument passed to update.DetailsSource node_modules/js-data-adapter/src/index.js, line 528 Properties:
Name Type Description opts.op
String beforeUpdate
-
beforeUpdateAll(mapper, props, query, opts)
-
Lifecycle method method called by updateAll.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes updateAll to wait for the Promise to resolve before continuing.
props
may be modified. You can also re-assignprops
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by updateAll.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to updateAll.props
Object The
props
argument passed to updateAll.query
Object The
query
argument passed to updateAll.opts
Object The
opts
argument passed to updateAll.DetailsSource node_modules/js-data-adapter/src/index.js, line 549 Properties:
Name Type Description opts.op
String beforeUpdateAll
-
beforeUpdateMany(mapper, props, opts)
-
Lifecycle method method called by updateMany.
Override this method to add custom behavior for this lifecycle hook.
Returning a Promise causes updateMany to wait for the Promise to resolve before continuing.
props
may be modified. You can also re-assignprops
to another value by returning a different value or a Promise that resolves to a different value.A thrown error or rejected Promise will bubble up and reject the Promise returned by updateMany.
Method parameters:Name Type Description mapper
Object The
mapper
argument passed to updateMany.props
Array.<Object> The
props
argument passed to updateMany.opts
Object The
opts
argument passed to updateMany.DetailsSource node_modules/js-data-adapter/src/index.js, line 570 Properties:
Name Type Description opts.op
String beforeUpdateMany
-
count(mapper, query, opts)
-
Retrieve the number of records that match the selection query. Called by
Mapper#count
.Method parameters:Name Type Argument Description mapper
Object The mapper.
query
Object <optional>
Selection query.
Properties
Name Type Argument Description where
Object <optional>
Filtering criteria.
orderBy
String | Array <optional>
Sorting criteria.
sort
String | Array <optional>
Same as
query.sort
.limit
Number <optional>
Limit results.
skip
Number <optional>
Offset results.
offset
Number <optional>
Same as
query.skip
.opts
Object <optional>
Configuration options.
Properties
Name Type Argument Default Description raw
Boolean <optional>
false Whether to return a more detailed response object.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 600 -
create(mapper, props, opts)
-
Create a new record. Called by
Mapper#create
.Method parameters:Name Type Argument Description mapper
Object The mapper.
props
Object The record to be created.
opts
Object <optional>
Configuration options.
Properties
Name Type Argument Default Description raw
Boolean <optional>
false Whether to return a more detailed response object.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 647 -
createMany(mapper, props, opts)
-
Create multiple records in a single batch. Called by
Mapper#createMany
.Method parameters:Name Type Argument Description mapper
Object The mapper.
props
Object The records to be created.
opts
Object <optional>
Configuration options.
Properties
Name Type Argument Default Description raw
Boolean <optional>
false Whether to return a more detailed response object.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 690 -
dbg()
-
Shortcut for
#log('debug'[, arg1[, arg2[, argn]]])
.DetailsSource node_modules/js-data-adapter/src/index.js, line 590 -
destroy(mapper, id, opts)
-
Destroy the record with the given primary key. Called by
Mapper#destroy
.Method parameters:Name Type Argument Description mapper
Object The mapper.
id
String | Number Primary key of the record to destroy.
opts
Object <optional>
Configuration options.
Properties
Name Type Argument Default Description raw
Boolean <optional>
false Whether to return a more detailed response object.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 736 -
destroyAll(mapper, query, opts)
-
Destroy the records that match the selection query. Called by
Mapper#destroyAll
.Method parameters:Name Type Argument Description mapper
Object the mapper.
query
Object <optional>
Selection query.
Properties
Name Type Argument Description where
Object <optional>
Filtering criteria.
orderBy
String | Array <optional>
Sorting criteria.
sort
String | Array <optional>
Same as
query.sort
.limit
Number <optional>
Limit results.
skip
Number <optional>
Offset results.
offset
Number <optional>
Same as
query.skip
.opts
Object <optional>
Configuration options.
Properties
Name Type Argument Default Description raw
Boolean <optional>
false Whether to return a more detailed response object.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 775 -
find(mapper, id, opts)
-
Retrieve the record with the given primary key. Called by
Mapper#find
.Method parameters:Name Type Argument Description mapper
Object The mapper.
id
String | Number Primary key of the record to retrieve.
opts
Object <optional>
Configuration options.
Properties
Name Type Argument Default Description raw
Boolean <optional>
false Whether to return a more detailed response object.
with
Array.<String> <optional>
[] Relations to eager load.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 863 -
findAll(mapper, query, opts)
-
Retrieve the records that match the selection query.
Method parameters:Name Type Argument Description mapper
Object The mapper.
query
Object <optional>
Selection query.
Properties
Name Type Argument Description where
Object <optional>
Filtering criteria.
orderBy
String | Array <optional>
Sorting criteria.
sort
String | Array <optional>
Same as
query.sort
.limit
Number <optional>
Limit results.
skip
Number <optional>
Offset results.
offset
Number <optional>
Same as
query.skip
.opts
Object <optional>
Configuration options.
Properties
Name Type Argument Default Description raw
Boolean <optional>
false Whether to return a more detailed response object.
with
Array.<String> <optional>
[] Relations to eager load.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 931 -
getOpt(opt, opts)
-
Resolve the value of the specified option based on the given options and this adapter's settings. Override with care.
Method parameters:Name Type Argument Description opt
String The name of the option.
opts
Object <optional>
Configuration options.
Return value:Type Description * The value of the specified option.
DetailsSource node_modules/js-data-adapter/src/index.js, line 1013 -
loadBelongsTo()
-
Load a belongsTo relationship.
Override with care.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 821 -
loadHasMany()
-
Load a hasMany relationship.
Override with care.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 1028 -
loadHasOne()
-
Load a hasOne relationship.
Override with care.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 1171 -
log(level, values)
-
Logging utility method. Override this method if you want to send log messages to something other than the console.
Method parameters:Name Type Argument Description level
String Log level.
values
* <repeatable>
Values to log.
DetailsSource node_modules/js-data-adapter/src/index.js, line 1194 -
makeBelongsToForeignKey()
-
Return the foreignKey from the given record for the provided relationship.
Override with care.
Return value:Type Description * Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 1265 -
makeHasManyForeignKey()
-
Return the foreignKey from the given record for the provided relationship.
There may be reasons why you may want to override this method, like when the id of the parent doesn't exactly match up to the key on the child.
Override with care.
Return value:Type Description * Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 1219 -
makeHasManyForeignKeys()
-
Return the foreignKeys from the given record for the provided relationship.
Override with care.
Return value:Type Description * Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 1252 -
makeHasManyLocalKeys()
-
Return the localKeys from the given record for the provided relationship.
Override with care.
Return value:Type Description * Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 1235 -
respond(response, opts)
-
Method parameters:
Name Type Description response
Object Response object.
opts
Object Configuration options. return {Object} If
opts.raw == true
then returnresponse
, else returnresponse.data
.DetailsSource node_modules/js-data-adapter/src/index.js, line 1329 -
sum(mapper, field, query, opts)
-
Retrieve sum of the specified field of the records that match the selection query. Called by
Mapper#sum
.Method parameters:Name Type Argument Description mapper
Object The mapper.
field
String By to sum.
query
Object <optional>
Selection query.
Properties
Name Type Argument Description where
Object <optional>
Filtering criteria.
orderBy
String | Array <optional>
Sorting criteria.
sort
String | Array <optional>
Same as
query.sort
.limit
Number <optional>
Limit results.
skip
Number <optional>
Offset results.
offset
Number <optional>
Same as
query.skip
.opts
Object <optional>
Configuration options.
Properties
Name Type Argument Default Description raw
Boolean <optional>
false Whether to return a more detailed response object.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 1278 -
update(mapper, id, props, opts)
-
Apply the given update to the record with the specified primary key. Called by
Mapper#update
.Method parameters:Name Type Argument Description mapper
Object The mapper.
id
String | Number The primary key of the record to be updated.
props
Object The update to apply to the record.
opts
Object <optional>
Configuration options.
Properties
Name Type Argument Default Description raw
Boolean <optional>
false Whether to return a more detailed response object.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 1341 -
updateAll(mapper, props, query, opts)
-
Apply the given update to all records that match the selection query. Called by
Mapper#updateAll
.Method parameters:Name Type Argument Description mapper
Object The mapper.
props
Object The update to apply to the selected records.
query
Object <optional>
Selection query.
Properties
Name Type Argument Description where
Object <optional>
Filtering criteria.
orderBy
String | Array <optional>
Sorting criteria.
sort
String | Array <optional>
Same as
query.sort
.limit
Number <optional>
Limit results.
skip
Number <optional>
Offset results.
offset
Number <optional>
Same as
query.skip
.opts
Object <optional>
Configuration options.
Properties
Name Type Argument Default Description raw
Boolean <optional>
false Whether to return a more detailed response object.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 1386 -
updateMany(mapper, records, opts)
-
Update the given records in a single batch. Called by
Mapper#updateMany
.Method parameters:Name Type Argument Description mapper
Object The mapper.
records
Array.<Object> The records to update.
opts
Object <optional>
Configuration options.
Properties
Name Type Argument Default Description raw
Boolean <optional>
false Whether to return a more detailed response object.
Return value:Type Description Promise Unspecified DetailsSource node_modules/js-data-adapter/src/index.js, line 1439