Class SnapshotRecordArray
publicSnapshotRecordArray is not directly instantiable.
Instances are provided to consuming application's
adapters for certain findAll
requests.
adapterOptions public
Defined in ../packages/legacy-compat/src/legacy-network-handler/snapshot-record-array.ts:59
A hash of adapter options passed into the store method for this request.
Example
import MyCustomAdapter from './custom-adapter';
export default class PostAdapter extends MyCustomAdapter {
findAll(store, type, sinceToken, snapshotRecordArray) {
if (snapshotRecordArray.adapterOptions.subscribe) {
// ...
}
// ...
}
}
include public
Defined in ../packages/legacy-compat/src/legacy-network-handler/snapshot-record-array.ts:83
The relationships to include for this request.
Example
import Adapter from '@ember-data/adapter';
export default class ApplicationAdapter extends Adapter {
findAll(store, type, snapshotRecordArray) {
let url = `/${type.modelName}?include=${encodeURIComponent(snapshotRecordArray.include)}`;
return fetch(url).then((response) => response.json())
}
}
length public
Defined in ../packages/legacy-compat/src/legacy-network-handler/snapshot-record-array.ts:118
Number of records in the array
Example
import JSONAPIAdapter from '@ember-data/adapter/json-api';
export default class PostAdapter extends JSONAPIAdapter {
shouldReloadAll(store, snapshotRecordArray) {
return !snapshotRecordArray.length;
}
});
modelName public
Defined in ../packages/legacy-compat/src/legacy-network-handler/snapshot-record-array.ts:51
The modelName of the underlying records for the snapshots in the array, as a Model