From 93fd134a92fb50cc6e8a9b5db3d6f25e84e6fa10 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Thu, 9 Mar 2017 21:46:16 +0100 Subject: Fix bugs and warnings in qlite --- qlite/src/update_builder.vala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qlite/src/update_builder.vala') diff --git a/qlite/src/update_builder.vala b/qlite/src/update_builder.vala index 5f721a32..41fd28b2 100644 --- a/qlite/src/update_builder.vala +++ b/qlite/src/update_builder.vala @@ -48,7 +48,7 @@ public class UpdateBuilder : StatementBuilder { return this; } - public UpdateBuilder set_null(Column column) { + public UpdateBuilder set_null(Column column) throws DatabaseError { if (column.not_null) throw new DatabaseError.ILLEGAL_QUERY(@"Can't set non-null column $(column.name) to null"); if (fields == null) { fields = { new NullField(column) }; @@ -63,8 +63,8 @@ public class UpdateBuilder : StatementBuilder { return this; } - public UpdateBuilder where(string selection, string[]? selection_args = null) { - if (selection != null) throw new DatabaseError.ILLEGAL_QUERY("selection was already done, but where() was called."); + public UpdateBuilder where(string selection, string[]? selection_args = null) throws DatabaseError { + if (this.selection != null) throw new DatabaseError.ILLEGAL_QUERY("selection was already done, but where() was called."); this.selection = selection; if (selection_args != null) { this.selection_args = new StatementBuilder.Field[selection_args.length]; -- cgit v1.2.3-54-g00ecf