FlutterQueryExecutor constructor

FlutterQueryExecutor({
  1. required String path,
  2. bool? logStatements,
  3. bool singleInstance = true,
  4. DatabaseCreator? creator,
})

A query executor that will store the database in the file declared by path. If logStatements is true, statements sent to the database will be printed, which can be handy for debugging. The singleInstance parameter sets the corresponding parameter on s.openDatabase. The creator will be called when the database file doesn't exist. It can be used to, for instance, populate default data from an asset. Note that migrations might behave differently when populating the database this way. For instance, a database created by an creator will not receive the MigrationStrategy.onCreate callback because it hasn't been created by moor.

Implementation

FlutterQueryExecutor(
    {required String path,
    bool? logStatements,
    bool singleInstance = true,
    DatabaseCreator? creator})
    : super(
          _SqfliteDelegate(false, path,
              singleInstance: singleInstance, creator: creator),
          logStatements: logStatements);