MemoryDatabaseAdapter constructor

MemoryDatabaseAdapter(
  1. {DocumentScoring documentScoring = const DocumentScoring(),
  2. Duration latency = const Duration()}
)

Constructs a new database.

Optional parameter documentScoring defines how documents are scored.

Optional parameter latency can be used for simulating non-memory databases.

Implementation

MemoryDatabaseAdapter({
  this.documentScoring = const DocumentScoring(),
  this.latency = const Duration(),
})  : assert(documentScoring != null),
      assert(latency != null);