Class: SyncSchemaValidationProcessor
An operation processor that ensures that an operation is compatible with its associated schema.
Hierarchy​
↳
SyncSchemaValidationProcessor
Constructors​
constructor​
• new SyncSchemaValidationProcessor(accessor
)
Parameters​
Name | Type |
---|---|
accessor | SyncRecordAccessor |
Overrides​
SyncOperationProcessor.constructor
Defined in​
record-cache/src/operation-processors/sync-schema-validation-processor.ts:22
Properties​
schema​
• schema: RecordSchema
Defined in​
record-cache/src/operation-processors/sync-schema-validation-processor.ts:19
validatorFor​
• validatorFor: ValidatorForFn
<StandardValidator
| StandardRecordValidator
>
Defined in​
record-cache/src/operation-processors/sync-schema-validation-processor.ts:20
Accessors​
accessor​
• get
accessor(): SyncRecordAccessor
The SyncRecordAccessor
that is monitored.
Returns​
Inherited from​
SyncOperationProcessor.accessor
Defined in​
record-cache/src/sync-operation-processor.ts:23
Methods​
after​
â–¸ after(operation
): RecordOperation
[]
Called before an operation
has been applied.
Returns an array of operations to be applied AFTER the operation
has been applied successfully.
Parameters​
Name | Type |
---|---|
operation | RecordOperation |
Returns​
RecordOperation
[]
Inherited from​
Defined in​
record-cache/src/sync-operation-processor.ts:64
before​
â–¸ before(operation
): RecordOperation
[]
Called before an operation
has been applied.
Returns an array of operations to be applied BEFORE the operation
itself is applied.
Parameters​
Name | Type |
---|---|
operation | RecordOperation |
Returns​
RecordOperation
[]
Inherited from​
Defined in​
record-cache/src/sync-operation-processor.ts:54
finally​
â–¸ finally(operation
): 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​
Name | Type |
---|---|
operation | RecordOperation |
Returns​
RecordOperation
[]
Inherited from​
SyncOperationProcessor.finally
Defined in​
record-cache/src/sync-operation-processor.ts:83
immediate​
â–¸ immediate(operation
): 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​
Name | Type |
---|---|
operation | RecordOperation |
Returns​
void
Inherited from​
SyncOperationProcessor.immediate
Defined in​
record-cache/src/sync-operation-processor.ts:75
reset​
â–¸ reset(base?
): 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​
Name | Type |
---|---|
base? | SyncRecordAccessor |
Returns​
void
Inherited from​
Defined in​
record-cache/src/sync-operation-processor.ts:36
upgrade​
â–¸ upgrade(): void
Allow the processor to perform an upgrade as part of a cache upgrade.
Returns​
void
Inherited from​
SyncOperationProcessor.upgrade
Defined in​
record-cache/src/sync-operation-processor.ts:41
validate​
â–¸ validate(operation
): void
Validates an operation before processing it.
Parameters​
Name | Type |
---|---|
operation | RecordOperation |
Returns​
void
Overrides​
SyncOperationProcessor.validate
Defined in​
record-cache/src/operation-processors/sync-schema-validation-processor.ts:37