newSqliteMemoryCacheStore function
Creates a new in-memory SqliteCacheStore
codec
: TheStoreCodec
used to convert to/from a Map<String, dynamic>` representation to a binary representationlogStatements
: IflogStatements
is true (defaults tofalse
), generated sql statements will be printed before executingdatabaseSetup
: This optional function can be used to perform a setup just after the database is opened, before drift is fully readycachePreparedStatements
: controls whether drift will cache prepared statement objects
Implementation
Future<SqliteCacheStore> newSqliteMemoryCacheStore(
{StoreCodec? codec,
bool? logStatements,
DatabaseSetup? databaseSetup,
bool? cachePreparedStatements}) {
return SqliteMemoryAdapter.build<CacheInfo, CacheEntry>(
(QueryExecutor executor) => CacheDatabase(executor),
logStatements: logStatements,
setup: databaseSetup,
cachePreparedStatements: cachePreparedStatements)
.then((adapter) => SqliteCacheStore(adapter, codec: codec));
}