aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-03-12 19:33:31 +0100
committerMarvin W <git@larma.de>2017-03-12 20:55:11 +0100
commitc2643a45b0dc05c4fd82ec7d32577700dae7450e (patch)
treed8a52d8eeee351f8279f9827b7e6d1b8024e7beb /libdino/src/service
parent4f34e431163ac49e2c41079d44c5dd4a71b362d1 (diff)
downloaddino-c2643a45b0dc05c4fd82ec7d32577700dae7450e.tar.gz
dino-c2643a45b0dc05c4fd82ec7d32577700dae7450e.zip
Qlite: Return OptionalRow instead of Row?, add ability to remove columns on version upgrade
Diffstat (limited to 'libdino/src/service')
-rw-r--r--libdino/src/service/database.vala8
1 files changed, 4 insertions, 4 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala
index b50581f8..885a1a8f 100644
--- a/libdino/src/service/database.vala
+++ b/libdino/src/service/database.vala
@@ -121,7 +121,7 @@ public class Database : Qlite.Database {
public AvatarTable avatar { get; private set; }
public EntityFeatureTable entity_feature { get; private set; }
- public Database(string fileName) {
+ public Database(string fileName) throws DatabaseError {
base(fileName, VERSION);
account = new AccountTable(this);
jid = new JidTable(this);
@@ -174,7 +174,7 @@ public class Database : Qlite.Database {
}
private Account? get_account_by_id(int id) {
- Row? row = account.row_with(account.id, id);
+ Row? row = account.row_with(account.id, id).inner;
if (row != null) {
return get_account_from_row(row);
}
@@ -300,7 +300,7 @@ public class Database : Qlite.Database {
}
public Message? get_message_by_id(int id) {
- Row? row = message.row_with(message.id, id);
+ Row? row = message.row_with(message.id, id).inner;
if (row != null) {
return get_message_from_row(row);
}
@@ -427,7 +427,7 @@ public class Database : Qlite.Database {
private int get_jid_id(Jid jid_obj) {
- Row? row = jid.row_with(jid.bare_jid, jid_obj.bare_jid.to_string());
+ Row? row = jid.row_with(jid.bare_jid, jid_obj.bare_jid.to_string()).inner;
return row != null ? row[jid.id] : add_jid(jid_obj);
}