aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-04-23 10:23:11 +0200
committerMarvin W <git@larma.de>2017-04-26 21:48:53 +0200
commit9728e832b18e8bbfcc0e011b5b1da9afe6021bf3 (patch)
tree301d6d127b7a94bd7f0f1ab7f496d5d26c007a3f /libdino/src/service
parenteddf17c68274c3e8ecf86a13858243159ffe9714 (diff)
downloaddino-9728e832b18e8bbfcc0e011b5b1da9afe6021bf3.tar.gz
dino-9728e832b18e8bbfcc0e011b5b1da9afe6021bf3.zip
qlite/libdino: optimize db access
Diffstat (limited to 'libdino/src/service')
-rw-r--r--libdino/src/service/database.vala3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala
index a74ac056..021d1c21 100644
--- a/libdino/src/service/database.vala
+++ b/libdino/src/service/database.vala
@@ -110,6 +110,8 @@ public class Database : Qlite.Database {
internal EntityFeatureTable(Database db) {
base(db, "entity_feature");
init({entity, feature});
+ unique({entity, feature}, "IGNORE");
+ index("entity_feature_idx", {entity});
}
}
@@ -135,6 +137,7 @@ public class Database : Qlite.Database {
avatar = new AvatarTable(this);
entity_feature = new EntityFeatureTable(this);
init({ account, jid, message, real_jid, conversation, avatar, entity_feature });
+ exec("PRAGMA synchronous=0");
}
public override void migrate(long oldVersion) {