InMemoryDatabasePool class

Simulated connections for tests; never touches physical storage.

Inheritance

Constructors

InMemoryDatabasePool({required String baseDir})
Creates an in-memory pool rooted at baseDir.

Properties

baseDir → String
Root directory for tenant databases.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
openHandle → Future<ZenithDatabaseHandle> Function(String path)
Application driver factory for physical database handles.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

acquireConnection(String tenantId, {ZenithTenantScope? scope}) → Future<ZenithDatabaseHandle>
Shares in-flight opens and rejects acquisitions for closing scopes.
inherited
bindScope(ZenithTenantScope scope) → void
Binds the currently open handle, once, to this scope's async cleanup.
inherited
disposeAll() → Future<void>
Permanently closes the pool, including acquisitions already in flight.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
releaseConnection(String tenantId) → Future<void>
Closes the cached handle and cancels any in-flight acquisition for this ID.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited