mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-24 14:32:37 +01:00
feat: Configure database
This commit is contained in:
parent
e9af28f22f
commit
9ce6743948
@ -65,8 +65,16 @@ class FlutterFluffyBoxDatabase extends FluffyBoxDatabase {
|
||||
final path = await _findDatabasePath(client);
|
||||
try {
|
||||
if (Platform.isAndroid || Platform.isIOS) {
|
||||
//opensqflite.open.overrideFor(sqlite3.OperatingSystem.android, openCipherOnAndroid);
|
||||
final db = await sqflite.openDatabase(path, password: password);
|
||||
final db = await sqflite.openDatabase(
|
||||
path,
|
||||
password: password,
|
||||
onConfigure: (db) async {
|
||||
await db.execute('PRAGMA page_size = 8192');
|
||||
await db.execute('PRAGMA cache_size = 16384');
|
||||
await db.execute('PRAGMA temp_store = MEMORY');
|
||||
await db.rawQuery('PRAGMA journal_mode = WAL');
|
||||
},
|
||||
);
|
||||
return db;
|
||||
}
|
||||
final db = await ffi.databaseFactoryFfi.openDatabase(path);
|
||||
|
@ -357,7 +357,7 @@ packages:
|
||||
name: fluffybox
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.1.4"
|
||||
version: "0.1.5"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
|
Loading…
Reference in New Issue
Block a user