NativeDatabase.memory constructor

NativeDatabase.memory({
  1. bool logStatements = false,
  2. DatabaseSetup? setup,
})

Creates an in-memory database won't persist its changes on disk.

If logStatements is true (defaults to false), generated sql statements will be printed before executing. This can be useful for debugging. The optional setup function can be used to perform a setup just after the database is opened, before drift is fully ready. This can be used to add custom user-defined sql functions or to provide encryption keys in SQLCipher implementations.

Implementation

factory NativeDatabase.memory(
    {bool logStatements = false, DatabaseSetup? setup}) {
  return NativeDatabase._(_NativeDelegate(null, setup), logStatements);
}