diff options
author | fiaxh <git@mx.ax.lt> | 2017-10-28 23:48:07 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-10-31 15:41:45 +0100 |
commit | b9df78e4494879752e9e68dcc5d54e03fffe9467 (patch) | |
tree | d1c74fde4aedea42773bc411c557f2184003defa /plugins/omemo/src/database.vala | |
parent | d9b91206c0291fa8aa58df572292784a4f8ff878 (diff) | |
download | dino-b9df78e4494879752e9e68dcc5d54e03fffe9467.tar.gz dino-b9df78e4494879752e9e68dcc5d54e03fffe9467.zip |
Move DatabaseError handling into Qlite
Diffstat (limited to 'plugins/omemo/src/database.vala')
-rw-r--r-- | plugins/omemo/src/database.vala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/omemo/src/database.vala b/plugins/omemo/src/database.vala index aa52daf0..52a1b15d 100644 --- a/plugins/omemo/src/database.vala +++ b/plugins/omemo/src/database.vala @@ -23,11 +23,11 @@ public class Database : Qlite.Database { index("identity_meta_list_idx", {address_name}); } - public QueryBuilder with_address(string address_name) throws DatabaseError { + public QueryBuilder with_address(string address_name) { return select().with(this.address_name, "=", address_name); } - public void insert_device_list(string address_name, ArrayList<int32> devices) throws DatabaseError { + public void insert_device_list(string address_name, ArrayList<int32> devices) { update().with(this.address_name, "=", address_name).set(now_active, false).perform(); foreach (int32 device_id in devices) { upsert() @@ -39,7 +39,7 @@ public class Database : Qlite.Database { } } - public int64 insert_device_bundle(string address_name, int device_id, Bundle bundle) throws DatabaseError { + public int64 insert_device_bundle(string address_name, int device_id, Bundle bundle) { if (bundle == null || bundle.identity_key == null) return -1; return upsert() .value(this.address_name, address_name, true) @@ -108,7 +108,7 @@ public class Database : Qlite.Database { public PreKeyTable pre_key { get; private set; } public SessionTable session { get; private set; } - public Database(string fileName) throws DatabaseError { + public Database(string fileName) { base(fileName, VERSION); identity_meta = new IdentityMetaTable(this); identity = new IdentityTable(this); @@ -124,4 +124,4 @@ public class Database : Qlite.Database { } } -}
\ No newline at end of file +} |