InMemorySchemaRegistry class
Simple in-memory registry used by tests and the in-memory adapter.
- Implemented types
Constructors
- InMemorySchemaRegistry({CollectionSchemaPolicy? defaultPolicy})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
beginMigrationLog(
{required String collection, required int fromVersion, required int toVersion, String? migrationId}) → Future< String?> -
Optional hook for logging migrations. Default no-op.
override
-
clearCheckpoint(
String collection) → Future< void> -
override
-
ensureReady(
) → Future< void> -
override
-
finishMigrationLog(
{String? logId, required String collection, required bool success, List< SchemaMigrationError> errors = const []}) → Future<void> -
Optional hook for finishing migration log. Default no-op.
override
-
getActiveSchema(
String collection) → Future< CollectionSchema?> -
override
-
loadAllActiveSchemas(
) → Future< Map< String, CollectionSchema> > -
override
-
loadCheckpoint(
String collection) → Future< SchemaMigrationCheckpoint?> -
Optional persistence for checkpoints. Default no-op.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recordSchemaHistory(
{required String collection, required int version, required Map< String, dynamic> schema, String? migrationId}) → Future<void> -
Optional hook to store historical schema versions.
override
-
saveCheckpoint(
SchemaMigrationCheckpoint checkpoint) → Future< void> -
override
-
setPolicy(
{required String collection, required CollectionSchemaPolicy policy}) → Future< CollectionSchemaPolicy> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
upsertSchema(
{required String collection, required int version, required Map< String, dynamic> schema, CollectionSchemaPolicy? policy}) → Future<CollectionSchema> -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited