Skip to main content
Version: 0.17

Class: AsyncSchemaValidationProcessor

An operation processor that ensures that an operation is compatible with its associated schema.

Hierarchy​

Constructors​

constructor​

• new AsyncSchemaValidationProcessor(accessor)

Parameters​

NameType
accessorAsyncRecordAccessor

Overrides​

AsyncOperationProcessor.constructor

Defined in​

record-cache/src/operation-processors/async-schema-validation-processor.ts:22

Properties​

schema​

• schema: RecordSchema

Defined in​

record-cache/src/operation-processors/async-schema-validation-processor.ts:19


validatorFor​

• validatorFor: ValidatorForFn<StandardValidator | StandardRecordValidator>

Defined in​

record-cache/src/operation-processors/async-schema-validation-processor.ts:20

Accessors​

accessor​

• get accessor(): AsyncRecordAccessor

The AsyncRecordAccessor that is monitored.

Returns​

AsyncRecordAccessor

Inherited from​

AsyncOperationProcessor.accessor

Defined in​

record-cache/src/async-operation-processor.ts:23

Methods​

after​

â–¸ after(operation): Promise<RecordOperation[]>

Called before an operation has been applied.

Returns an array of operations to be applied AFTER the operation has been applied successfully.

Parameters​

NameType
operationRecordOperation

Returns​

Promise<RecordOperation[]>

Inherited from​

AsyncOperationProcessor.after

Defined in​

record-cache/src/async-operation-processor.ts:70


before​

â–¸ before(operation): Promise<RecordOperation[]>

Called before an operation has been applied.

Returns an array of operations to be applied BEFORE the operation itself is applied.

Parameters​

NameType
operationRecordOperation

Returns​

Promise<RecordOperation[]>

Inherited from​

AsyncOperationProcessor.before

Defined in​

record-cache/src/async-operation-processor.ts:60


finally​

â–¸ finally(operation): Promise<RecordOperation[]>

Called after an operation and any related operations have been applied.

Returns an array of operations to be applied AFTER the operation itself and any operations returned from the after hook have been applied.

Parameters​

NameType
operationRecordOperation

Returns​

Promise<RecordOperation[]>

Inherited from​

AsyncOperationProcessor.finally

Defined in​

record-cache/src/async-operation-processor.ts:91


immediate​

â–¸ immediate(operation): Promise<void>

Called immediately after an operation has been applied and before the patch event has been emitted (i.e. before any listeners have been notified that the operation was applied).

No operations may be returned.

Parameters​

NameType
operationRecordOperation

Returns​

Promise<void>

Inherited from​

AsyncOperationProcessor.immediate

Defined in​

record-cache/src/async-operation-processor.ts:81


reset​

â–¸ reset(base?): Promise<void>

Called when all the data in a cache has been reset.

If base is included, the cache is being reset to match a base cache.

Parameters​

NameType
base?AsyncRecordAccessor

Returns​

Promise<void>

Inherited from​

AsyncOperationProcessor.reset

Defined in​

record-cache/src/async-operation-processor.ts:36


upgrade​

â–¸ upgrade(): Promise<void>

Allow the processor to perform an upgrade as part of a cache upgrade.

Returns​

Promise<void>

Inherited from​

AsyncOperationProcessor.upgrade

Defined in​

record-cache/src/async-operation-processor.ts:43


validate​

â–¸ validate(operation): Promise<void>

Validates an operation before processing it.

Parameters​

NameType
operationRecordOperation

Returns​

Promise<void>

Overrides​

AsyncOperationProcessor.validate

Defined in​

record-cache/src/operation-processors/async-schema-validation-processor.ts:37