Skip to main content
Version: 0.17

Class: SimpleRecordTransformBuffer

Hierarchy​

Implements​

Constructors​

constructor​

• new SimpleRecordTransformBuffer(settings)

Parameters​

NameType
settingsSyncRecordCacheSettings<RecordCacheQueryOptions, RecordCacheTransformOptions, RecordQueryBuilder<string, RecordIdentity>, RecordTransformBuilder<string, RecordIdentity, UninitializedRecord>>

Overrides​

SyncRecordCache.constructor

Defined in​

record-cache/src/simple-record-transform-buffer.ts:36

Accessors​

defaultQueryOptions​

• get defaultQueryOptions(): undefined | DefaultRequestOptions<QueryOptions>

Returns​

undefined | DefaultRequestOptions<QueryOptions>

Inherited from​

SyncRecordCache.defaultQueryOptions

Defined in​

record-cache/src/record-cache.ts:187

• set defaultQueryOptions(options): void

Parameters​

NameType
optionsundefined | DefaultRequestOptions<QueryOptions>

Returns​

void

Inherited from​

SyncRecordCache.defaultQueryOptions

Defined in​

record-cache/src/record-cache.ts:191


defaultTransformOptions​

• get defaultTransformOptions(): undefined | DefaultRequestOptions<TransformOptions>

Returns​

undefined | DefaultRequestOptions<TransformOptions>

Inherited from​

SyncRecordCache.defaultTransformOptions

Defined in​

record-cache/src/record-cache.ts:197

• set defaultTransformOptions(options): void

Parameters​

NameType
optionsundefined | DefaultRequestOptions<TransformOptions>

Returns​

void

Inherited from​

SyncRecordCache.defaultTransformOptions

Defined in​

record-cache/src/record-cache.ts:203


keyMap​

• get keyMap(): undefined | RecordKeyMap

Returns​

undefined | RecordKeyMap

Implementation of​

RecordTransformBuffer.keyMap

Inherited from​

SyncRecordCache.keyMap

Defined in​

record-cache/src/record-cache.ts:169


name​

• get name(): undefined | string

Returns​

undefined | string

Implementation of​

RecordTransformBuffer.name

Inherited from​

SyncRecordCache.name

Defined in​

record-cache/src/record-cache.ts:161


processors​

• get processors(): SyncOperationProcessor[]

Returns​

SyncOperationProcessor[]

Inherited from​

SyncRecordCache.processors

Defined in​

record-cache/src/sync-record-cache.ts:131


queryBuilder​

• get queryBuilder(): QueryBuilder

Returns​

QueryBuilder

Inherited from​

SyncRecordCache.queryBuilder

Defined in​

record-cache/src/record-cache.ts:179


schema​

• get schema(): RecordSchema

Returns​

RecordSchema

Implementation of​

RecordTransformBuffer.schema

Inherited from​

SyncRecordCache.schema

Defined in​

record-cache/src/record-cache.ts:165


transformBuilder​

• get transformBuilder(): TransformBuilder

Returns​

TransformBuilder

Inherited from​

SyncRecordCache.transformBuilder

Defined in​

record-cache/src/record-cache.ts:183


validatorFor​

• get validatorFor(): undefined | ValidatorForFn<StandardValidator | StandardRecordValidator>

Returns​

undefined | ValidatorForFn<StandardValidator | StandardRecordValidator>

Inherited from​

SyncRecordCache.validatorFor

Defined in​

record-cache/src/record-cache.ts:173

Methods​

addInverseRelationshipsSync​

â–¸ addInverseRelationshipsSync(relationships): void

Parameters​

NameType
relationshipsRecordRelationshipIdentity[]

Returns​

void

Implementation of​

RecordTransformBuffer.addInverseRelationshipsSync

Overrides​

SyncRecordCache.addInverseRelationshipsSync

Defined in​

record-cache/src/simple-record-transform-buffer.ts:184


applyRecordChangesetSync​

â–¸ applyRecordChangesetSync(changeset): void

Parameters​

NameType
changesetRecordChangeset

Returns​

void

Implementation of​

RecordTransformBuffer.applyRecordChangesetSync

Inherited from​

SyncRecordCache.applyRecordChangesetSync

Defined in​

record-cache/src/sync-record-cache.ts:174


emit​

â–¸ emit(event, ...args): void

Parameters​

NameType
eventEvent
...argsunknown[]

Returns​

void

Inherited from​

SyncRecordCache.emit

Defined in​

core/dist/modules/evented.d.ts:23


getInverseRelationshipsSync​

â–¸ getInverseRelationshipsSync(recordIdentityOrIdentities): RecordRelationshipIdentity[]

Parameters​

NameType
recordIdentityOrIdentitiesRecordIdentity | RecordIdentity[]

Returns​

RecordRelationshipIdentity[]

Implementation of​

RecordTransformBuffer.getInverseRelationshipsSync

Overrides​

SyncRecordCache.getInverseRelationshipsSync

Defined in​

record-cache/src/simple-record-transform-buffer.ts:167


getInverseTransformOperator​

â–¸ getInverseTransformOperator(op): SyncInverseTransformOperator

Parameters​

NameType
opstring

Returns​

SyncInverseTransformOperator

Inherited from​

SyncRecordCache.getInverseTransformOperator

Defined in​

record-cache/src/sync-record-cache.ts:143


getQueryOperator​

â–¸ getQueryOperator(op): SyncQueryOperator

Parameters​

NameType
opstring

Returns​

SyncQueryOperator

Inherited from​

SyncRecordCache.getQueryOperator

Defined in​

record-cache/src/sync-record-cache.ts:135


getQueryOptions​

â–¸ getQueryOptions(query, expression?): undefined | RecordCacheQueryOptions

Parameters​

NameType
queryRecordQuery
expression?RecordQueryExpression

Returns​

undefined | RecordCacheQueryOptions

Inherited from​

SyncRecordCache.getQueryOptions

Defined in​

record-cache/src/record-cache.ts:209


getRecordSync​

â–¸ getRecordSync(identity): undefined | InitializedRecord

Parameters​

NameType
identityRecordIdentity

Returns​

undefined | InitializedRecord

Implementation of​

RecordTransformBuffer.getRecordSync

Overrides​

SyncRecordCache.getRecordSync

Defined in​

record-cache/src/simple-record-transform-buffer.ts:102


getRecordsSync​

â–¸ getRecordsSync(typeOrIdentities?): InitializedRecord[]

Parameters​

NameType
typeOrIdentities?string | RecordIdentity[]

Returns​

InitializedRecord[]

Implementation of​

RecordTransformBuffer.getRecordsSync

Overrides​

SyncRecordCache.getRecordsSync

Defined in​

record-cache/src/simple-record-transform-buffer.ts:106


getRelatedRecordSync​

â–¸ getRelatedRecordSync(identity, relationship): undefined | null | RecordIdentity

Parameters​

NameType
identityRecordIdentity
relationshipstring

Returns​

undefined | null | RecordIdentity

Implementation of​

RecordTransformBuffer.getRelatedRecordSync

Inherited from​

SyncRecordCache.getRelatedRecordSync

Defined in​

record-cache/src/sync-record-cache.ts:196


getRelatedRecordsSync​

â–¸ getRelatedRecordsSync(identity, relationship): undefined | RecordIdentity[]

Parameters​

NameType
identityRecordIdentity
relationshipstring

Returns​

undefined | RecordIdentity[]

Implementation of​

RecordTransformBuffer.getRelatedRecordsSync

Inherited from​

SyncRecordCache.getRelatedRecordsSync

Defined in​

record-cache/src/sync-record-cache.ts:207


getTransformOperator​

â–¸ getTransformOperator(op): SyncTransformOperator

Parameters​

NameType
opstring

Returns​

SyncTransformOperator

Inherited from​

SyncRecordCache.getTransformOperator

Defined in​

record-cache/src/sync-record-cache.ts:139


getTransformOptions​

â–¸ getTransformOptions(transform, operation?): undefined | RecordCacheTransformOptions

Parameters​

NameType
transformRecordTransform
operation?RecordOperation

Returns​

undefined | RecordCacheTransformOptions

Inherited from​

SyncRecordCache.getTransformOptions

Defined in​

record-cache/src/record-cache.ts:223


listeners​

â–¸ listeners(event): Listener[]

Parameters​

NameType
eventEvent

Returns​

Listener[]

Inherited from​

SyncRecordCache.listeners

Defined in​

core/dist/modules/evented.d.ts:24


liveQuery​

â–¸ liveQuery(queryOrExpressions, options?, id?): SyncLiveQuery<RecordCacheQueryOptions, RecordCacheTransformOptions, RecordQueryBuilder<string, RecordIdentity>, RecordTransformBuilder<string, RecordIdentity, UninitializedRecord>>

Parameters​

NameType
queryOrExpressionsQueryOrExpressions<RecordQueryExpression, RecordQueryBuilder<string, RecordIdentity>>
options?DefaultRequestOptions<RecordCacheQueryOptions>
id?string

Returns​

SyncLiveQuery<RecordCacheQueryOptions, RecordCacheTransformOptions, RecordQueryBuilder<string, RecordIdentity>, RecordTransformBuilder<string, RecordIdentity, UninitializedRecord>>

Inherited from​

SyncRecordCache.liveQuery

Defined in​

record-cache/src/sync-record-cache.ts:319


off​

â–¸ off(event, listener?): void

Parameters​

NameType
eventEvent
listener?Listener

Returns​

void

Inherited from​

SyncRecordCache.off

Defined in​

core/dist/modules/evented.d.ts:21


on​

â–¸ on(event, listener): () => void

Parameters​

NameType
eventEvent
listenerListener

Returns​

fn

â–¸ (): void

Returns​

void

Inherited from​

SyncRecordCache.on

Defined in​

core/dist/modules/evented.d.ts:20


one​

â–¸ one(event, listener): () => void

Parameters​

NameType
eventEvent
listenerListener

Returns​

fn

â–¸ (): void

Returns​

void

Inherited from​

SyncRecordCache.one

Defined in​

core/dist/modules/evented.d.ts:22


patch​

â–¸ patch(operationOrOperations): PatchResult

Patches the cache with an operation or operations.

deprecated since v0.17

Parameters​

NameType
operationOrOperationsRecordOperation | RecordOperation[] | RecordTransformBuilderFunc | RecordOperationTerm<string, RecordIdentity, UninitializedRecord> | RecordOperationTerm<string, RecordIdentity, UninitializedRecord>[]

Returns​

PatchResult

Inherited from​

SyncRecordCache.patch

Defined in​

record-cache/src/sync-record-cache.ts:295


query​

â–¸ query<RequestData>(queryOrExpressions, options?, id?): RequestData

Queries the cache.

Type parameters​

NameType
RequestDataextends RecordQueryResult<InitializedRecord> = RecordQueryResult<InitializedRecord>

Parameters​

NameType
queryOrExpressionsQueryOrExpressions<RecordQueryExpression, RecordQueryBuilder<string, RecordIdentity>>
options?DefaultRequestOptions<RecordCacheQueryOptions>
id?string

Returns​

RequestData

Inherited from​

SyncRecordCache.query

Defined in​

record-cache/src/sync-record-cache.ts:221

â–¸ query<RequestData>(queryOrExpressions, options, id?): FullResponse<RequestData, unknown, RecordOperation>

Type parameters​

NameType
RequestDataextends RecordQueryResult<InitializedRecord> = RecordQueryResult<InitializedRecord>

Parameters​

NameType
queryOrExpressionsQueryOrExpressions<RecordQueryExpression, RecordQueryBuilder<string, RecordIdentity>>
optionsFullRequestOptions<RecordCacheQueryOptions>
id?string

Returns​

FullResponse<RequestData, unknown, RecordOperation>

Inherited from​

SyncRecordCache.query

Defined in​

record-cache/src/sync-record-cache.ts:226


removeInverseRelationshipsSync​

â–¸ removeInverseRelationshipsSync(relationships): void

Parameters​

NameType
relationshipsRecordRelationshipIdentity[]

Returns​

void

Implementation of​

RecordTransformBuffer.removeInverseRelationshipsSync

Overrides​

SyncRecordCache.removeInverseRelationshipsSync

Defined in​

record-cache/src/simple-record-transform-buffer.ts:201


removeRecordSync​

â–¸ removeRecordSync(recordIdentity): undefined | InitializedRecord

Parameters​

NameType
recordIdentityRecordIdentity

Returns​

undefined | InitializedRecord

Implementation of​

RecordTransformBuffer.removeRecordSync

Overrides​

SyncRecordCache.removeRecordSync

Defined in​

record-cache/src/simple-record-transform-buffer.ts:137


removeRecordsSync​

â–¸ removeRecordsSync(recordIdentities): InitializedRecord[]

Parameters​

NameType
recordIdentitiesRecordIdentity[]

Returns​

InitializedRecord[]

Implementation of​

RecordTransformBuffer.removeRecordsSync

Overrides​

SyncRecordCache.removeRecordsSync

Defined in​

record-cache/src/simple-record-transform-buffer.ts:152


resetState​

â–¸ resetState(): void

Returns​

void

Implementation of​

RecordTransformBuffer.resetState

Defined in​

record-cache/src/simple-record-transform-buffer.ts:41


setRecordSync​

â–¸ setRecordSync(record): void

Parameters​

NameType
recordInitializedRecord

Returns​

void

Implementation of​

RecordTransformBuffer.setRecordSync

Overrides​

SyncRecordCache.setRecordSync

Defined in​

record-cache/src/simple-record-transform-buffer.ts:126


setRecordsSync​

â–¸ setRecordsSync(records): void

Parameters​

NameType
recordsInitializedRecord[]

Returns​

void

Implementation of​

RecordTransformBuffer.setRecordsSync

Overrides​

SyncRecordCache.setRecordsSync

Defined in​

record-cache/src/simple-record-transform-buffer.ts:133


startTrackingChanges​

â–¸ startTrackingChanges(): void

Returns​

void

Implementation of​

RecordTransformBuffer.startTrackingChanges

Defined in​

record-cache/src/simple-record-transform-buffer.ts:48


stopTrackingChanges​

â–¸ stopTrackingChanges(): RecordChangeset

Returns​

RecordChangeset

Implementation of​

RecordTransformBuffer.stopTrackingChanges

Defined in​

record-cache/src/simple-record-transform-buffer.ts:55


update​

â–¸ update<RequestData>(transformOrOperations, options?, id?): RequestData

Updates the cache.

Type parameters​

NameType
RequestDataextends RecordTransformResult<InitializedRecord> = RecordTransformResult<InitializedRecord>

Parameters​

NameType
transformOrOperationsTransformOrOperations<RecordOperation, RecordTransformBuilder<string, RecordIdentity, UninitializedRecord>>
options?DefaultRequestOptions<RecordCacheTransformOptions>
id?string

Returns​

RequestData

Implementation of​

RecordTransformBuffer.update

Inherited from​

SyncRecordCache.update

Defined in​

record-cache/src/sync-record-cache.ts:257

â–¸ update<RequestData>(transformOrOperations, options, id?): FullResponse<RequestData, RecordCacheUpdateDetails, RecordOperation>

Type parameters​

NameType
RequestDataextends RecordTransformResult<InitializedRecord> = RecordTransformResult<InitializedRecord>

Parameters​

NameType
transformOrOperationsTransformOrOperations<RecordOperation, RecordTransformBuilder<string, RecordIdentity, UninitializedRecord>>
optionsFullRequestOptions<RecordCacheTransformOptions>
id?string

Returns​

FullResponse<RequestData, RecordCacheUpdateDetails, RecordOperation>

Implementation of​

RecordTransformBuffer.update

Inherited from​

SyncRecordCache.update

Defined in​

record-cache/src/sync-record-cache.ts:262