MemoryDatabaseAdapter class

An adapter that stores data in the local memory.

Example

import 'package:database/database.dart';

void main() {
  final database = MemoryDatabaseAdapter().database();
}
Inheritance

Constructors

MemoryDatabaseAdapter({DocumentScoring documentScoring: const DocumentScoring(), Duration latency: const Duration()})
Constructs a new database. [...]

Properties

documentScoring DocumentScoring
Document scoring system.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
latency Duration
Latency for simulating latency in slower databases.
final
length int
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

clear() → void
close() Future<void>
Closes the database adapter.
@mustCallSuper, inherited
database() Database
Returns the database.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
performCheckConnection({Duration timeout}) Future<void>
inherited
performDocumentBatch(DocumentBatchRequest request) Future<void>
inherited
performDocumentDelete(DocumentDeleteRequest request) Future<void>
override
performDocumentDeleteBySearch(DocumentDeleteBySearchRequest request) Future<void>
inherited
performDocumentInsert(DocumentInsertRequest request) Future<void>
Inserts by using read and upsert operations inside a transaction.
override
performDocumentRead(DocumentReadRequest request) Stream<Snapshot>
override
performDocumentReadWatch(DocumentReadWatchRequest request) Stream<Snapshot>
inherited
performDocumentSearch(DocumentSearchRequest request) Stream<QueryResult>
override
performDocumentSearchChunked(DocumentSearchChunkedRequest request) Stream<QueryResult>
inherited
performDocumentSearchWatch(DocumentSearchWatchRequest request) Stream<QueryResult>
inherited
performDocumentTransaction(DocumentTransactionRequest request) Future<void>
override
performDocumentUpdate(DocumentUpdateRequest request) Future<void>
Updates by using read and upsert operations inside a transaction.
override
performDocumentUpdateBySearch(DocumentUpdateBySearchRequest request) Future<void>
inherited
performDocumentUpsert(DocumentUpsertRequest request) Future<void>
override
performExtension(DatabaseExtensionRequest<DatabaseExtensionResponse> request) Stream<DatabaseExtensionResponse>
inherited
performSchemaRead(SchemaReadRequest request) Stream<DatabaseSchema>
inherited
performSqlQuery(SqlQueryRequest request) Future<SqlIterator>
inherited
performSqlStatement(SqlStatementRequest request) Future<SqlStatementResult>
inherited
performSqlTransaction(SqlTransactionRequest request) Future<void>
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited