lib/cli/create_db: make WAL mode optional
This commit is contained in:
@@ -12,6 +12,16 @@ class CreateDb extends Command {
|
||||
|
||||
CreateDb() {
|
||||
addLibsqliteArg(argParser);
|
||||
argParser.addFlag(
|
||||
'wal',
|
||||
help:
|
||||
'''Whether to use Write-Ahead Logging (WAL) mode.
|
||||
|
||||
This is recommended for better performance, but may not be used with
|
||||
the readonly NixOS store.
|
||||
''',
|
||||
defaultsTo: false,
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> run() async {
|
||||
@@ -22,6 +32,7 @@ class CreateDb extends Command {
|
||||
|
||||
final db = await openLocalDb(
|
||||
libsqlitePath: argResults!.option('libsqlite')!,
|
||||
walMode: argResults!.flag('wal'),
|
||||
readWrite: true,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user