build<I extends Info, E extends Entry<I> > static method
Future<SqliteAdapter<I, E> >
build<I extends Info, E extends Entry<I> >(
- SqliteBuilder<
I, E> builder, - File file, {
- bool? logStatements,
- DatabaseSetup? setup,
- bool? cachePreparedStatements,
- FutureOr<
void> isolateSetup()?,
Builds SqliteBackgroundFileAdapter.
builder
: Database builderfile
: The File that store the Sqlite databaselogStatements
: Generated sql statements will be printed before executingsetup
: Function that can be used to perform a setup just after the database is openedcachePreparedStatements
: controls whether drift will cache prepared statement objectsisolateSetup
: function that can perform setup work on the isolate before opening the database.
Implementation
static Future<SqliteAdapter<I, E>> build<I extends Info, E extends Entry<I>>(
SqliteBuilder<I, E> builder, File file,
{bool? logStatements,
DatabaseSetup? setup,
bool? cachePreparedStatements,
FutureOr<void> Function()? isolateSetup}) {
return Future.value(SqliteBackgroundFileAdapter._(
builder(NativeDatabase.createInBackground(file,
logStatements: logStatements ?? false,
setup: setup,
cachePreparedStatements: cachePreparedStatements ?? false)),
file));
}