summaryrefslogtreecommitdiff
path: root/src/db/DatabaseTable.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-07-09 12:10:38 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-07-09 12:10:38 +0200
commit709e2d6f5652ec90c194a4ec2b530bebc6f952cb (patch)
tree496b2f3899e1d5728ee9ae76095cc5056c317447 /src/db/DatabaseTable.c
parentf1353e9ffd34db5f755c7da0b3f9c10638fbfd38 (diff)
parent5c8be07095cc04a6d8a95204b0504fd7ab030154 (diff)
Merge branch 'release/0.28.3-1'0.28.3-1
Diffstat (limited to 'src/db/DatabaseTable.c')
-rw-r--r--src/db/DatabaseTable.c1978
1 files changed, 940 insertions, 1038 deletions
diff --git a/src/db/DatabaseTable.c b/src/db/DatabaseTable.c
index 8d595f0..4c1b44e 100644
--- a/src/db/DatabaseTable.c
+++ b/src/db/DatabaseTable.c
@@ -1,4 +1,4 @@
-/* DatabaseTable.c generated by valac 0.36.6, the Vala compiler
+/* DatabaseTable.c generated by valac 0.40.4, the Vala compiler
* generated from DatabaseTable.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -7,6 +7,7 @@
* See the COPYING file in this distribution.
*/
+
#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
@@ -73,41 +74,87 @@ static gint database_table_in_transaction = 0;
GQuark database_error_quark (void);
gpointer database_table_ref (gpointer instance);
void database_table_unref (gpointer instance);
-GParamSpec* param_spec_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
-void value_set_database_table (GValue* value, gpointer v_object);
-void value_take_database_table (GValue* value, gpointer v_object);
+GParamSpec* param_spec_database_table (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags);
+void value_set_database_table (GValue* value,
+ gpointer v_object);
+void value_take_database_table (GValue* value,
+ gpointer v_object);
gpointer value_get_database_table (const GValue* value);
GType database_table_get_type (void) G_GNUC_CONST;
-enum {
- DATABASE_TABLE_DUMMY_PROPERTY
-};
#define DATABASE_TABLE_SCHEMA_VERSION 20
static void database_table_prepare_db (const gchar* filename);
void app_window_panic (const gchar* msg);
#define DB_IN_MEMORY_NAME ":memory:"
void database_table_on_trace (const gchar* message);
-static void _database_table_on_trace_sqlite_trace_callback (gpointer self, const gchar* message);
+static void _database_table_on_trace_sqlite_trace_callback (gpointer self,
+ const gchar* message);
void database_table_init (const gchar* filename);
-void database_table_warning (const gchar* op, gint res);
+void database_table_warning (const gchar* op,
+ gint res);
void database_table_terminate (void);
-void database_table_fatal (const gchar* op, gint res);
-void database_table_set_table_name (DatabaseTable* self, const gchar* table_name);
-void database_table_throw_error (const gchar* method, gint res, GError** error);
-gboolean database_table_exists_by_id (DatabaseTable* self, gint64 id);
-gboolean database_table_select_by_id (DatabaseTable* self, gint64 id, const gchar* columns, sqlite3_stmt* * stmt);
-static void database_table_prepare_update_by_id (DatabaseTable* self, gint64 id, const gchar* column, sqlite3_stmt* * stmt);
-static gboolean database_table_execute_update_by_id (DatabaseTable* self, sqlite3_stmt* stmt);
-gboolean database_table_update_text_by_id (DatabaseTable* self, gint64 id, const gchar* column, const gchar* text);
-void database_table_update_text_by_id_2 (DatabaseTable* self, gint64 id, const gchar* column, const gchar* text, GError** error);
-gboolean database_table_update_int_by_id (DatabaseTable* self, gint64 id, const gchar* column, gint value);
-void database_table_update_int_by_id_2 (DatabaseTable* self, gint64 id, const gchar* column, gint value, GError** error);
-gboolean database_table_update_int64_by_id (DatabaseTable* self, gint64 id, const gchar* column, gint64 value);
-void database_table_update_int64_by_id_2 (DatabaseTable* self, gint64 id, const gchar* column, gint64 value, GError** error);
-void database_table_delete_by_id (DatabaseTable* self, gint64 id, GError** error);
-gboolean database_table_has_column (const gchar* table_name, const gchar* column_name);
+void database_table_fatal (const gchar* op,
+ gint res);
+void database_table_set_table_name (DatabaseTable* self,
+ const gchar* table_name);
+void database_table_throw_error (const gchar* method,
+ gint res,
+ GError** error);
+gboolean database_table_exists_by_id (DatabaseTable* self,
+ gint64 id);
+gboolean database_table_select_by_id (DatabaseTable* self,
+ gint64 id,
+ const gchar* columns,
+ sqlite3_stmt* * stmt);
+static void database_table_prepare_update_by_id (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ sqlite3_stmt* * stmt);
+static gboolean database_table_execute_update_by_id (DatabaseTable* self,
+ sqlite3_stmt* stmt);
+gboolean database_table_update_text_by_id (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ const gchar* text);
+void database_table_update_text_by_id_2 (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ const gchar* text,
+ GError** error);
+gboolean database_table_update_int_by_id (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ gint value);
+void database_table_update_int_by_id_2 (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ gint value,
+ GError** error);
+gboolean database_table_update_int64_by_id (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ gint64 value);
+void database_table_update_int64_by_id_2 (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ gint64 value,
+ GError** error);
+void database_table_delete_by_id (DatabaseTable* self,
+ gint64 id,
+ GError** error);
+gboolean database_table_has_column (const gchar* table_name,
+ const gchar* column_name);
gboolean database_table_has_table (const gchar* table_name);
-gboolean database_table_add_column (const gchar* table_name, const gchar* column_name, const gchar* column_constraints);
-gboolean database_table_ensure_column (const gchar* table_name, const gchar* column_name, const gchar* column_constraints, const gchar* upgrade_msg);
+gboolean database_table_add_column (const gchar* table_name,
+ const gchar* column_name,
+ const gchar* column_constraints);
+gboolean database_table_ensure_column (const gchar* table_name,
+ const gchar* column_name,
+ const gchar* column_constraints,
+ const gchar* upgrade_msg);
gint database_table_get_row_count (DatabaseTable* self);
void database_table_begin_transaction (void);
void database_table_commit_transaction (GError** error);
@@ -115,156 +162,142 @@ DatabaseTable* database_table_construct (GType object_type);
static void database_table_finalize (DatabaseTable * obj);
-GQuark database_error_quark (void) {
+GQuark
+database_error_quark (void)
+{
return g_quark_from_static_string ("database_error-quark");
}
-static void _database_table_on_trace_sqlite_trace_callback (gpointer self, const gchar* message) {
+static void
+_database_table_on_trace_sqlite_trace_callback (gpointer self,
+ const gchar* message)
+{
#line 57 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
database_table_on_trace (message);
-#line 127 "DatabaseTable.c"
+#line 179 "DatabaseTable.c"
}
-static void database_table_prepare_db (const gchar* filename) {
+static void
+database_table_prepare_db (const gchar* filename)
+{
gint res = 0;
- const gchar* _tmp0_;
- sqlite3* _tmp1_ = NULL;
+ sqlite3* _tmp0_ = NULL;
+ gint _tmp1_;
gint _tmp2_;
- gint _tmp3_;
- const gchar* _tmp8_;
const gchar* sql_debug = NULL;
- const gchar* _tmp23_;
- gboolean _tmp24_ = FALSE;
- const gchar* _tmp25_;
+ const gchar* _tmp16_;
+ gboolean _tmp17_ = FALSE;
+ const gchar* _tmp18_;
GError * _inner_error_ = NULL;
#line 32 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (filename != NULL);
#line 34 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = filename;
-#line 34 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp2_ = sqlite3_open_v2 (_tmp0_, &_tmp1_, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
+ _tmp1_ = sqlite3_open_v2 (filename, &_tmp0_, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
#line 34 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_close0 (database_table_db);
#line 34 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_db = _tmp1_;
+ database_table_db = _tmp0_;
#line 34 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp2_;
+ res = _tmp1_;
#line 36 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = res;
+ _tmp2_ = res;
#line 36 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp3_ != SQLITE_OK) {
-#line 159 "DatabaseTable.c"
- const gchar* _tmp4_;
- gint _tmp5_;
- gchar* _tmp6_;
- gchar* _tmp7_;
-#line 37 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = filename;
+ if (_tmp2_ != SQLITE_OK) {
+#line 209 "DatabaseTable.c"
+ gint _tmp3_;
+ gchar* _tmp4_;
+ gchar* _tmp5_;
#line 37 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = res;
+ _tmp3_ = res;
#line 37 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = g_strdup_printf (_ ("Unable to open/create photo database %s: error code %d"), _tmp4_, _tmp5_);
+ _tmp4_ = g_strdup_printf (_ ("Unable to open/create photo database %s: error code %d"), filename, _tmp3_);
#line 37 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = _tmp6_;
+ _tmp5_ = _tmp4_;
#line 37 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- app_window_panic (_tmp7_);
+ app_window_panic (_tmp5_);
#line 37 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp7_);
-#line 176 "DatabaseTable.c"
+ _g_free0 (_tmp5_);
+#line 223 "DatabaseTable.c"
}
#line 41 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = filename;
-#line 41 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (g_strcmp0 (_tmp8_, DB_IN_MEMORY_NAME) != 0) {
-#line 182 "DatabaseTable.c"
+ if (g_strcmp0 (filename, DB_IN_MEMORY_NAME) != 0) {
+#line 227 "DatabaseTable.c"
{
GFile* file_db = NULL;
- const gchar* _tmp9_;
- GFile* _tmp10_;
+ GFile* _tmp6_;
GFileInfo* info = NULL;
- GFile* _tmp11_;
- GFileInfo* _tmp12_;
- GFileInfo* _tmp13_;
- gboolean _tmp14_;
-#line 43 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = filename;
+ GFile* _tmp7_;
+ GFileInfo* _tmp8_;
+ GFileInfo* _tmp9_;
#line 43 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = g_file_new_for_path (_tmp9_);
+ _tmp6_ = g_file_new_for_path (filename);
#line 43 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- file_db = _tmp10_;
+ file_db = _tmp6_;
#line 44 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = file_db;
+ _tmp7_ = file_db;
#line 44 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = g_file_query_info (_tmp11_, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, G_FILE_QUERY_INFO_NONE, NULL, &_inner_error_);
+ _tmp8_ = g_file_query_info (_tmp7_, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, G_FILE_QUERY_INFO_NONE, NULL, &_inner_error_);
#line 44 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- info = _tmp12_;
+ info = _tmp8_;
#line 44 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 44 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_object_unref0 (file_db);
-#line 208 "DatabaseTable.c"
+#line 249 "DatabaseTable.c"
goto __catch15_g_error;
}
#line 45 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = info;
+ _tmp9_ = info;
#line 45 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = g_file_info_get_attribute_boolean (_tmp13_, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE);
-#line 45 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (!_tmp14_) {
-#line 217 "DatabaseTable.c"
- const gchar* _tmp15_;
- gchar* _tmp16_;
- gchar* _tmp17_;
-#line 46 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp15_ = filename;
+ if (!g_file_info_get_attribute_boolean (_tmp9_, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE)) {
+#line 256 "DatabaseTable.c"
+ gchar* _tmp10_;
+ gchar* _tmp11_;
#line 46 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp16_ = g_strdup_printf (_ ("Unable to write to photo database file:\n %s"), _tmp15_);
+ _tmp10_ = g_strdup_printf (_ ("Unable to write to photo database file:\n %s"), filename);
#line 46 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp17_ = _tmp16_;
+ _tmp11_ = _tmp10_;
#line 46 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- app_window_panic (_tmp17_);
+ app_window_panic (_tmp11_);
#line 46 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp17_);
-#line 231 "DatabaseTable.c"
+ _g_free0 (_tmp11_);
+#line 267 "DatabaseTable.c"
}
#line 42 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_object_unref0 (info);
#line 42 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_object_unref0 (file_db);
-#line 237 "DatabaseTable.c"
+#line 273 "DatabaseTable.c"
}
goto __finally15;
__catch15_g_error:
{
GError* e = NULL;
- const gchar* _tmp18_;
- GError* _tmp19_;
- const gchar* _tmp20_;
- gchar* _tmp21_;
- gchar* _tmp22_;
+ GError* _tmp12_;
+ const gchar* _tmp13_;
+ gchar* _tmp14_;
+ gchar* _tmp15_;
#line 42 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
e = _inner_error_;
#line 42 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_inner_error_ = NULL;
#line 48 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp18_ = filename;
-#line 48 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp19_ = e;
+ _tmp12_ = e;
#line 48 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp20_ = _tmp19_->message;
+ _tmp13_ = _tmp12_->message;
#line 48 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp21_ = g_strdup_printf (_ ("Error accessing database file:\n %s\n\nError was: \n%s"), _tmp18_, _tmp20_);
+ _tmp14_ = g_strdup_printf (_ ("Error accessing database file:\n %s\n\nError was: \n%s"), filename, _tmp13_);
#line 48 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp22_ = _tmp21_;
+ _tmp15_ = _tmp14_;
#line 48 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- app_window_panic (_tmp22_);
+ app_window_panic (_tmp15_);
#line 48 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp22_);
+ _g_free0 (_tmp15_);
#line 42 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_error_free0 (e);
-#line 268 "DatabaseTable.c"
+#line 301 "DatabaseTable.c"
}
__finally15:
#line 42 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -275,239 +308,225 @@ static void database_table_prepare_db (const gchar* filename) {
g_clear_error (&_inner_error_);
#line 42 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 279 "DatabaseTable.c"
+#line 312 "DatabaseTable.c"
}
}
#line 53 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp23_ = g_getenv ("SHOTWELL_SQL_DEBUG");
+ _tmp16_ = g_getenv ("SHOTWELL_SQL_DEBUG");
#line 53 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- sql_debug = _tmp23_;
+ sql_debug = _tmp16_;
#line 56 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp25_ = sql_debug;
+ _tmp18_ = sql_debug;
#line 56 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp25_ != NULL) {
-#line 290 "DatabaseTable.c"
- const gchar* _tmp26_;
+ if (_tmp18_ != NULL) {
+#line 323 "DatabaseTable.c"
+ const gchar* _tmp19_;
#line 56 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp26_ = sql_debug;
+ _tmp19_ = sql_debug;
#line 56 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp24_ = g_strcmp0 (_tmp26_, "") != 0;
-#line 296 "DatabaseTable.c"
+ _tmp17_ = g_strcmp0 (_tmp19_, "") != 0;
+#line 329 "DatabaseTable.c"
} else {
#line 56 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp24_ = FALSE;
-#line 300 "DatabaseTable.c"
+ _tmp17_ = FALSE;
+#line 333 "DatabaseTable.c"
}
#line 56 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp24_) {
-#line 304 "DatabaseTable.c"
- sqlite3* _tmp27_;
+ if (_tmp17_) {
+#line 337 "DatabaseTable.c"
+ sqlite3* _tmp20_;
#line 57 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp27_ = database_table_db;
+ _tmp20_ = database_table_db;
#line 57 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- sqlite3_trace (_tmp27_, _database_table_on_trace_sqlite_trace_callback, NULL);
-#line 310 "DatabaseTable.c"
+ sqlite3_trace (_tmp20_, _database_table_on_trace_sqlite_trace_callback, NULL);
+#line 343 "DatabaseTable.c"
}
}
-void database_table_on_trace (const gchar* message) {
- const gchar* _tmp0_;
+void
+database_table_on_trace (const gchar* message)
+{
#line 61 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (message != NULL);
#line 62 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = message;
-#line 62 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- g_debug ("DatabaseTable.vala:62: SQLITE: %s", _tmp0_);
-#line 323 "DatabaseTable.c"
+ g_debug ("DatabaseTable.vala:62: SQLITE: %s", message);
+#line 355 "DatabaseTable.c"
}
-static gint _sqlite3_exec (sqlite3* self, const gchar* sql, sqlite3_callback callback, void* callback_target, gchar* * errmsg) {
+static gint
+_sqlite3_exec (sqlite3* self,
+ const gchar* sql,
+ sqlite3_callback callback,
+ void* callback_target,
+ gchar* * errmsg)
+{
gchar* _vala_errmsg = NULL;
gint result = 0;
const gchar* sqlite_errmsg = NULL;
gint ec = 0;
- const gchar* _tmp0_;
- sqlite3_callback _tmp1_;
- void* _tmp1__target;
- const gchar* _tmp2_ = NULL;
- gint _tmp3_;
- const gchar* _tmp6_;
-#line 34 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
+ const gchar* _tmp0_ = NULL;
+ gint _tmp1_;
+ const gchar* _tmp4_;
+#line 34 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
g_return_val_if_fail (self != NULL, 0);
-#line 34 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
+#line 34 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
g_return_val_if_fail (sql != NULL, 0);
-#line 36 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
- _tmp0_ = sql;
-#line 36 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
- _tmp1_ = callback;
-#line 36 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
- _tmp1__target = callback_target;
-#line 36 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
- _tmp3_ = sqlite3_exec (self, _tmp0_, _tmp1_, _tmp1__target, (char**) (&_tmp2_));
-#line 36 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
- sqlite_errmsg = _tmp2_;
-#line 36 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
- ec = _tmp3_;
-#line 37 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
+#line 36 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
+ _tmp1_ = sqlite3_exec (self, sql, callback, callback_target, (char**) (&_tmp0_));
+#line 36 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
+ sqlite_errmsg = _tmp0_;
+#line 36 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
+ ec = _tmp1_;
+#line 37 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
if ((&_vala_errmsg) != NULL) {
-#line 356 "DatabaseTable.c"
- const gchar* _tmp4_;
- gchar* _tmp5_;
-#line 38 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
- _tmp4_ = sqlite_errmsg;
-#line 38 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
- _tmp5_ = g_strdup (_tmp4_);
-#line 38 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
+#line 385 "DatabaseTable.c"
+ const gchar* _tmp2_;
+ gchar* _tmp3_;
+#line 38 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
+ _tmp2_ = sqlite_errmsg;
+#line 38 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
+ _tmp3_ = g_strdup (_tmp2_);
+#line 38 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
_g_free0 (_vala_errmsg);
-#line 38 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
- _vala_errmsg = _tmp5_;
-#line 367 "DatabaseTable.c"
+#line 38 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
+ _vala_errmsg = _tmp3_;
+#line 396 "DatabaseTable.c"
}
-#line 40 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
- _tmp6_ = sqlite_errmsg;
-#line 40 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
- sqlite3_free ((void*) _tmp6_);
-#line 41 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
+#line 40 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
+ _tmp4_ = sqlite_errmsg;
+#line 40 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
+ sqlite3_free ((void*) _tmp4_);
+#line 41 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
result = ec;
-#line 41 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
+#line 41 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
if (errmsg) {
-#line 41 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
+#line 41 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
*errmsg = _vala_errmsg;
-#line 379 "DatabaseTable.c"
+#line 408 "DatabaseTable.c"
} else {
-#line 41 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
+#line 41 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
_g_free0 (_vala_errmsg);
-#line 383 "DatabaseTable.c"
+#line 412 "DatabaseTable.c"
}
-#line 41 "/usr/share/vala-0.36/vapi/sqlite3.vapi"
+#line 41 "/usr/share/vala-0.40/vapi/sqlite3.vapi"
return result;
-#line 387 "DatabaseTable.c"
+#line 416 "DatabaseTable.c"
}
-void database_table_init (const gchar* filename) {
- const gchar* _tmp0_;
+void
+database_table_init (const gchar* filename)
+{
sqlite3_stmt* stmt = NULL;
gint res = 0;
- sqlite3* _tmp1_;
- sqlite3_stmt* _tmp2_ = NULL;
+ sqlite3* _tmp0_;
+ sqlite3_stmt* _tmp1_ = NULL;
+ gint _tmp2_;
gint _tmp3_;
- gint _tmp4_;
- sqlite3* _tmp18_;
- gint _tmp19_;
- gint _tmp20_;
+ sqlite3* _tmp14_;
+ gint _tmp15_;
+ gint _tmp16_;
GError * _inner_error_ = NULL;
#line 65 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (filename != NULL);
#line 67 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = filename;
-#line 67 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_prepare_db (_tmp0_);
+ database_table_prepare_db (filename);
#line 71 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = database_table_db;
+ _tmp0_ = database_table_db;
#line 71 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = sqlite3_prepare_v2 (_tmp1_, "CREATE TABLE IF NOT EXISTS VersionTable (" "id INTEGER PRIMARY KEY, " "schema_version INTEGER, " "app_version TEXT, " "user_data TEXT NULL" ")", -1, &_tmp2_, NULL);
+ _tmp2_ = sqlite3_prepare_v2 (_tmp0_, "CREATE TABLE IF NOT EXISTS VersionTable (" "id INTEGER PRIMARY KEY, " "schema_version INTEGER, " "app_version TEXT, " "user_data TEXT NULL" ")", -1, &_tmp1_, NULL);
#line 71 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 71 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- stmt = _tmp2_;
+ stmt = _tmp1_;
#line 71 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp3_;
+ res = _tmp2_;
#line 79 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = res;
+ _tmp3_ = res;
#line 79 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp4_ != SQLITE_OK) {
-#line 423 "DatabaseTable.c"
+ if (_tmp3_ != SQLITE_OK) {
+#line 451 "DatabaseTable.c"
gchar* backup_path = NULL;
- const gchar* _tmp5_;
- gchar* _tmp6_;
+ gchar* _tmp4_;
#line 80 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_close0 (database_table_db);
#line 80 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
database_table_db = NULL;
#line 82 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = filename;
-#line 82 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = g_strconcat (_tmp5_, ".bak", NULL);
+ _tmp4_ = g_strconcat (filename, ".bak", NULL);
#line 82 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- backup_path = _tmp6_;
-#line 437 "DatabaseTable.c"
+ backup_path = _tmp4_;
+#line 462 "DatabaseTable.c"
{
GFile* src = NULL;
- const gchar* _tmp7_;
- GFile* _tmp8_;
+ const gchar* _tmp5_;
+ GFile* _tmp6_;
GFile* dest = NULL;
- const gchar* _tmp9_;
- GFile* _tmp10_;
- GFile* _tmp11_;
- GFile* _tmp12_;
- const gchar* _tmp13_;
+ GFile* _tmp7_;
+ GFile* _tmp8_;
+ GFile* _tmp9_;
#line 85 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = backup_path;
+ _tmp5_ = backup_path;
#line 85 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = g_file_new_for_commandline_arg (_tmp7_);
+ _tmp6_ = g_file_new_for_commandline_arg (_tmp5_);
#line 85 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- src = _tmp8_;
-#line 86 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = filename;
+ src = _tmp6_;
#line 86 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = g_file_new_for_commandline_arg (_tmp9_);
+ _tmp7_ = g_file_new_for_commandline_arg (filename);
#line 86 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- dest = _tmp10_;
+ dest = _tmp7_;
#line 87 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = src;
+ _tmp8_ = src;
#line 87 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = dest;
+ _tmp9_ = dest;
#line 87 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- g_file_copy (_tmp11_, _tmp12_, G_FILE_COPY_OVERWRITE | G_FILE_COPY_ALL_METADATA, NULL, NULL, NULL, &_inner_error_);
+ g_file_copy (_tmp8_, _tmp9_, G_FILE_COPY_OVERWRITE | G_FILE_COPY_ALL_METADATA, NULL, NULL, NULL, &_inner_error_);
#line 87 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 87 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_object_unref0 (dest);
#line 87 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_object_unref0 (src);
-#line 472 "DatabaseTable.c"
+#line 493 "DatabaseTable.c"
goto __catch16_g_error;
}
#line 90 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = filename;
-#line 90 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_prepare_db (_tmp13_);
+ database_table_prepare_db (filename);
#line 84 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_object_unref0 (dest);
#line 84 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_object_unref0 (src);
-#line 483 "DatabaseTable.c"
+#line 502 "DatabaseTable.c"
}
goto __finally16;
__catch16_g_error:
{
GError* _error_ = NULL;
- GError* _tmp14_;
- const gchar* _tmp15_;
- gchar* _tmp16_;
- gchar* _tmp17_;
+ GError* _tmp10_;
+ const gchar* _tmp11_;
+ gchar* _tmp12_;
+ gchar* _tmp13_;
#line 84 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_error_ = _inner_error_;
#line 84 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_inner_error_ = NULL;
#line 92 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = _error_;
+ _tmp10_ = _error_;
#line 92 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp15_ = _tmp14_->message;
+ _tmp11_ = _tmp10_->message;
#line 92 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp16_ = g_strdup_printf (_ ("Unable to restore photo database %s"), _tmp15_);
+ _tmp12_ = g_strdup_printf (_ ("Unable to restore photo database %s"), _tmp11_);
#line 92 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp17_ = _tmp16_;
+ _tmp13_ = _tmp12_;
#line 92 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- app_window_panic (_tmp17_);
+ app_window_panic (_tmp13_);
#line 92 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp17_);
+ _g_free0 (_tmp13_);
#line 84 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_error_free0 (_error_);
-#line 511 "DatabaseTable.c"
+#line 530 "DatabaseTable.c"
}
__finally16:
#line 84 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -522,146 +541,137 @@ void database_table_init (const gchar* filename) {
g_clear_error (&_inner_error_);
#line 84 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 526 "DatabaseTable.c"
+#line 545 "DatabaseTable.c"
}
#line 79 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (backup_path);
-#line 530 "DatabaseTable.c"
+#line 549 "DatabaseTable.c"
}
#line 98 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp18_ = database_table_db;
+ _tmp14_ = database_table_db;
#line 98 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp19_ = _sqlite3_exec (_tmp18_, "PRAGMA synchronous=OFF", NULL, NULL, NULL);
+ _tmp15_ = _sqlite3_exec (_tmp14_, "PRAGMA synchronous=OFF", NULL, NULL, NULL);
#line 98 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp19_;
+ res = _tmp15_;
#line 99 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp20_ = res;
+ _tmp16_ = res;
#line 99 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp20_ != SQLITE_OK) {
-#line 542 "DatabaseTable.c"
- gint _tmp21_;
+ if (_tmp16_ != SQLITE_OK) {
+#line 561 "DatabaseTable.c"
+ gint _tmp17_;
#line 100 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp21_ = res;
+ _tmp17_ = res;
#line 100 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_warning ("Unable to disable synchronous mode", _tmp21_);
-#line 548 "DatabaseTable.c"
+ database_table_warning ("Unable to disable synchronous mode", _tmp17_);
+#line 567 "DatabaseTable.c"
}
#line 65 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
-#line 552 "DatabaseTable.c"
+#line 571 "DatabaseTable.c"
}
-void database_table_terminate (void) {
+void
+database_table_terminate (void)
+{
#line 105 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_close0 (database_table_db);
#line 105 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
database_table_db = NULL;
-#line 561 "DatabaseTable.c"
+#line 582 "DatabaseTable.c"
}
-void database_table_fatal (const gchar* op, gint res) {
- const gchar* _tmp0_;
- gint _tmp1_;
- sqlite3* _tmp2_;
- const gchar* _tmp3_;
+void
+database_table_fatal (const gchar* op,
+ gint res)
+{
+ sqlite3* _tmp0_;
+ const gchar* _tmp1_;
#line 109 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (op != NULL);
#line 110 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = op;
-#line 110 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = res;
-#line 110 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp2_ = database_table_db;
+ _tmp0_ = database_table_db;
#line 110 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = sqlite3_errmsg (_tmp2_);
+ _tmp1_ = sqlite3_errmsg (_tmp0_);
#line 110 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- g_error ("DatabaseTable.vala:110: %s: [%d] %s", _tmp0_, _tmp1_, _tmp3_);
-#line 582 "DatabaseTable.c"
+ g_error ("DatabaseTable.vala:110: %s: [%d] %s", op, res, _tmp1_);
+#line 600 "DatabaseTable.c"
}
-void database_table_warning (const gchar* op, gint res) {
- const gchar* _tmp0_;
- gint _tmp1_;
- sqlite3* _tmp2_;
- const gchar* _tmp3_;
+void
+database_table_warning (const gchar* op,
+ gint res)
+{
+ sqlite3* _tmp0_;
+ const gchar* _tmp1_;
#line 114 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (op != NULL);
#line 115 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = op;
-#line 115 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = res;
-#line 115 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp2_ = database_table_db;
+ _tmp0_ = database_table_db;
#line 115 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = sqlite3_errmsg (_tmp2_);
+ _tmp1_ = sqlite3_errmsg (_tmp0_);
#line 115 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- g_warning ("DatabaseTable.vala:115: %s: [%d] %s", _tmp0_, _tmp1_, _tmp3_);
-#line 603 "DatabaseTable.c"
+ g_warning ("DatabaseTable.vala:115: %s: [%d] %s", op, res, _tmp1_);
+#line 618 "DatabaseTable.c"
}
-void database_table_set_table_name (DatabaseTable* self, const gchar* table_name) {
- const gchar* _tmp0_;
- gchar* _tmp1_;
+void
+database_table_set_table_name (DatabaseTable* self,
+ const gchar* table_name)
+{
+ gchar* _tmp0_;
#line 118 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (IS_DATABASE_TABLE (self));
#line 118 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (table_name != NULL);
#line 119 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = table_name;
-#line 119 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = g_strdup (_tmp0_);
+ _tmp0_ = g_strdup (table_name);
#line 119 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (self->table_name);
#line 119 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- self->table_name = _tmp1_;
-#line 622 "DatabaseTable.c"
+ self->table_name = _tmp0_;
+#line 637 "DatabaseTable.c"
}
-void database_table_throw_error (const gchar* method, gint res, GError** error) {
+void
+database_table_throw_error (const gchar* method,
+ gint res,
+ GError** error)
+{
gchar* msg = NULL;
- const gchar* _tmp0_;
- gint _tmp1_;
- sqlite3* _tmp2_;
- const gchar* _tmp3_;
- gchar* _tmp4_;
- gint _tmp5_;
+ sqlite3* _tmp0_;
+ const gchar* _tmp1_;
+ gchar* _tmp2_;
GError * _inner_error_ = NULL;
#line 124 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (method != NULL);
#line 125 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = method;
-#line 125 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = res;
-#line 125 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp2_ = database_table_db;
+ _tmp0_ = database_table_db;
#line 125 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = sqlite3_errmsg (_tmp2_);
+ _tmp1_ = sqlite3_errmsg (_tmp0_);
#line 125 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = g_strdup_printf ("(%s) [%d] - %s", _tmp0_, _tmp1_, _tmp3_);
+ _tmp2_ = g_strdup_printf ("(%s) [%d] - %s", method, res, _tmp1_);
#line 125 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- msg = _tmp4_;
+ msg = _tmp2_;
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = res;
-#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- switch (_tmp5_) {
+ switch (res) {
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
case SQLITE_OK:
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
case SQLITE_DONE:
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
case SQLITE_ROW:
-#line 659 "DatabaseTable.c"
+#line 669 "DatabaseTable.c"
{
#line 131 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (msg);
#line 131 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 665 "DatabaseTable.c"
+#line 675 "DatabaseTable.c"
}
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
case SQLITE_PERM:
@@ -683,16 +693,16 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
case SQLITE_FORMAT:
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
case SQLITE_NOTADB:
-#line 687 "DatabaseTable.c"
+#line 697 "DatabaseTable.c"
{
- const gchar* _tmp6_;
- GError* _tmp7_;
+ const gchar* _tmp3_;
+ GError* _tmp4_;
#line 143 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = msg;
+ _tmp3_ = msg;
#line 143 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_BACKING, _tmp6_);
+ _tmp4_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_BACKING, _tmp3_);
#line 143 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _inner_error_ = _tmp7_;
+ _inner_error_ = _tmp4_;
#line 143 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (_inner_error_->domain == DATABASE_ERROR) {
#line 143 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -701,7 +711,7 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
_g_free0 (msg);
#line 143 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 705 "DatabaseTable.c"
+#line 715 "DatabaseTable.c"
} else {
#line 143 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (msg);
@@ -711,21 +721,21 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
g_clear_error (&_inner_error_);
#line 143 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 715 "DatabaseTable.c"
+#line 725 "DatabaseTable.c"
}
}
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
case SQLITE_NOMEM:
-#line 720 "DatabaseTable.c"
+#line 730 "DatabaseTable.c"
{
- const gchar* _tmp8_;
- GError* _tmp9_;
+ const gchar* _tmp5_;
+ GError* _tmp6_;
#line 146 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = msg;
+ _tmp5_ = msg;
#line 146 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_MEMORY, _tmp8_);
+ _tmp6_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_MEMORY, _tmp5_);
#line 146 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _inner_error_ = _tmp9_;
+ _inner_error_ = _tmp6_;
#line 146 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (_inner_error_->domain == DATABASE_ERROR) {
#line 146 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -734,7 +744,7 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
_g_free0 (msg);
#line 146 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 738 "DatabaseTable.c"
+#line 748 "DatabaseTable.c"
} else {
#line 146 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (msg);
@@ -744,7 +754,7 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
g_clear_error (&_inner_error_);
#line 146 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 748 "DatabaseTable.c"
+#line 758 "DatabaseTable.c"
}
}
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -753,16 +763,16 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
case SQLITE_LOCKED:
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
case SQLITE_INTERRUPT:
-#line 757 "DatabaseTable.c"
+#line 767 "DatabaseTable.c"
{
- const gchar* _tmp10_;
- GError* _tmp11_;
+ const gchar* _tmp7_;
+ GError* _tmp8_;
#line 151 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = msg;
+ _tmp7_ = msg;
#line 151 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_ABORT, _tmp10_);
+ _tmp8_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_ABORT, _tmp7_);
#line 151 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _inner_error_ = _tmp11_;
+ _inner_error_ = _tmp8_;
#line 151 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (_inner_error_->domain == DATABASE_ERROR) {
#line 151 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -771,7 +781,7 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
_g_free0 (msg);
#line 151 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 775 "DatabaseTable.c"
+#line 785 "DatabaseTable.c"
} else {
#line 151 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (msg);
@@ -781,7 +791,7 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
g_clear_error (&_inner_error_);
#line 151 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 785 "DatabaseTable.c"
+#line 795 "DatabaseTable.c"
}
}
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -794,16 +804,16 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
case SQLITE_CONSTRAINT:
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
case SQLITE_RANGE:
-#line 798 "DatabaseTable.c"
+#line 808 "DatabaseTable.c"
{
- const gchar* _tmp12_;
- GError* _tmp13_;
+ const gchar* _tmp9_;
+ GError* _tmp10_;
#line 158 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = msg;
+ _tmp9_ = msg;
#line 158 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_LIMITS, _tmp12_);
+ _tmp10_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_LIMITS, _tmp9_);
#line 158 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _inner_error_ = _tmp13_;
+ _inner_error_ = _tmp10_;
#line 158 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (_inner_error_->domain == DATABASE_ERROR) {
#line 158 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -812,7 +822,7 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
_g_free0 (msg);
#line 158 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 816 "DatabaseTable.c"
+#line 826 "DatabaseTable.c"
} else {
#line 158 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (msg);
@@ -822,23 +832,23 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
g_clear_error (&_inner_error_);
#line 158 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 826 "DatabaseTable.c"
+#line 836 "DatabaseTable.c"
}
}
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
case SQLITE_SCHEMA:
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
case SQLITE_MISMATCH:
-#line 833 "DatabaseTable.c"
+#line 843 "DatabaseTable.c"
{
- const gchar* _tmp14_;
- GError* _tmp15_;
+ const gchar* _tmp11_;
+ GError* _tmp12_;
#line 162 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = msg;
+ _tmp11_ = msg;
#line 162 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp15_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_TYPESPEC, _tmp14_);
+ _tmp12_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_TYPESPEC, _tmp11_);
#line 162 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _inner_error_ = _tmp15_;
+ _inner_error_ = _tmp12_;
#line 162 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (_inner_error_->domain == DATABASE_ERROR) {
#line 162 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -847,7 +857,7 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
_g_free0 (msg);
#line 162 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 851 "DatabaseTable.c"
+#line 861 "DatabaseTable.c"
} else {
#line 162 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (msg);
@@ -857,7 +867,7 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
g_clear_error (&_inner_error_);
#line 162 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 861 "DatabaseTable.c"
+#line 871 "DatabaseTable.c"
}
}
default:
@@ -867,16 +877,16 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
case SQLITE_INTERNAL:
#line 127 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
case SQLITE_MISUSE:
-#line 871 "DatabaseTable.c"
+#line 881 "DatabaseTable.c"
{
- const gchar* _tmp16_;
- GError* _tmp17_;
+ const gchar* _tmp13_;
+ GError* _tmp14_;
#line 168 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp16_ = msg;
+ _tmp13_ = msg;
#line 168 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp17_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_ERROR, _tmp16_);
+ _tmp14_ = g_error_new_literal (DATABASE_ERROR, DATABASE_ERROR_ERROR, _tmp13_);
#line 168 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _inner_error_ = _tmp17_;
+ _inner_error_ = _tmp14_;
#line 168 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (_inner_error_->domain == DATABASE_ERROR) {
#line 168 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -885,7 +895,7 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
_g_free0 (msg);
#line 168 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 889 "DatabaseTable.c"
+#line 899 "DatabaseTable.c"
} else {
#line 168 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (msg);
@@ -895,17 +905,20 @@ void database_table_throw_error (const gchar* method, gint res, GError** error)
g_clear_error (&_inner_error_);
#line 168 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 899 "DatabaseTable.c"
+#line 909 "DatabaseTable.c"
}
}
}
#line 124 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (msg);
-#line 905 "DatabaseTable.c"
+#line 915 "DatabaseTable.c"
}
-gboolean database_table_exists_by_id (DatabaseTable* self, gint64 id) {
+gboolean
+database_table_exists_by_id (DatabaseTable* self,
+ gint64 id)
+{
gboolean result = FALSE;
sqlite3_stmt* stmt = NULL;
gint res = 0;
@@ -918,14 +931,11 @@ gboolean database_table_exists_by_id (DatabaseTable* self, gint64 id) {
gint _tmp6_;
gint _tmp7_;
sqlite3_stmt* _tmp8_;
- gint64 _tmp9_;
- gint _tmp10_;
- gint _tmp11_;
- sqlite3_stmt* _tmp12_;
- gint _tmp13_;
- gboolean _tmp14_ = FALSE;
- gint _tmp15_;
- gint _tmp24_;
+ gint _tmp9_;
+ sqlite3_stmt* _tmp10_;
+ gboolean _tmp11_ = FALSE;
+ gint _tmp12_;
+ gint _tmp20_;
#line 172 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (IS_DATABASE_TABLE (self), FALSE);
#line 174 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -955,236 +965,216 @@ gboolean database_table_exists_by_id (DatabaseTable* self, gint64 id) {
#line 177 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_tmp8_ = stmt;
#line 177 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = id;
-#line 177 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = sqlite3_bind_int64 (_tmp8_, 1, _tmp9_);
-#line 177 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp10_;
+ res = sqlite3_bind_int64 (_tmp8_, 1, id);
#line 178 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = res;
+ _tmp9_ = res;
#line 178 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp11_ == SQLITE_OK, "res == Sqlite.OK");
-#line 180 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = stmt;
+ _vala_assert (_tmp9_ == SQLITE_OK, "res == Sqlite.OK");
#line 180 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = sqlite3_step (_tmp12_);
+ _tmp10_ = stmt;
#line 180 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp13_;
+ res = sqlite3_step (_tmp10_);
#line 181 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp15_ = res;
+ _tmp12_ = res;
#line 181 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp15_ != SQLITE_ROW) {
-#line 978 "DatabaseTable.c"
- gint _tmp16_;
+ if (_tmp12_ != SQLITE_ROW) {
+#line 982 "DatabaseTable.c"
+ gint _tmp13_;
#line 181 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp16_ = res;
+ _tmp13_ = res;
#line 181 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = _tmp16_ != SQLITE_DONE;
-#line 984 "DatabaseTable.c"
+ _tmp11_ = _tmp13_ != SQLITE_DONE;
+#line 988 "DatabaseTable.c"
} else {
#line 181 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = FALSE;
-#line 988 "DatabaseTable.c"
+ _tmp11_ = FALSE;
+#line 992 "DatabaseTable.c"
}
#line 181 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp14_) {
-#line 992 "DatabaseTable.c"
- gint64 _tmp17_;
+ if (_tmp11_) {
+#line 996 "DatabaseTable.c"
+ gchar* _tmp14_;
+ gchar* _tmp15_;
+ const gchar* _tmp16_;
+ gchar* _tmp17_;
gchar* _tmp18_;
- gchar* _tmp19_;
- const gchar* _tmp20_;
- gchar* _tmp21_;
- gchar* _tmp22_;
- gint _tmp23_;
-#line 182 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp17_ = id;
+ gint _tmp19_;
#line 182 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp18_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp17_);
+ _tmp14_ = g_strdup_printf ("%" G_GINT64_FORMAT, id);
#line 182 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp19_ = _tmp18_;
+ _tmp15_ = _tmp14_;
#line 182 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp20_ = self->table_name;
+ _tmp16_ = self->table_name;
#line 182 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp21_ = g_strdup_printf ("exists_by_id [%s] %s", _tmp19_, _tmp20_);
+ _tmp17_ = g_strdup_printf ("exists_by_id [%s] %s", _tmp15_, _tmp16_);
#line 182 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp22_ = _tmp21_;
+ _tmp18_ = _tmp17_;
#line 182 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp23_ = res;
+ _tmp19_ = res;
#line 182 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_fatal (_tmp22_, _tmp23_);
+ database_table_fatal (_tmp18_, _tmp19_);
#line 182 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp22_);
+ _g_free0 (_tmp18_);
#line 182 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp19_);
-#line 1020 "DatabaseTable.c"
+ _g_free0 (_tmp15_);
+#line 1021 "DatabaseTable.c"
}
#line 184 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp24_ = res;
+ _tmp20_ = res;
#line 184 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- result = _tmp24_ == SQLITE_ROW;
+ result = _tmp20_ == SQLITE_ROW;
#line 184 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 184 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 1030 "DatabaseTable.c"
+#line 1031 "DatabaseTable.c"
}
-gboolean database_table_select_by_id (DatabaseTable* self, gint64 id, const gchar* columns, sqlite3_stmt* * stmt) {
+gboolean
+database_table_select_by_id (DatabaseTable* self,
+ gint64 id,
+ const gchar* columns,
+ sqlite3_stmt* * stmt)
+{
sqlite3_stmt* _vala_stmt = NULL;
gboolean result = FALSE;
gchar* sql = NULL;
const gchar* _tmp0_;
- const gchar* _tmp1_;
- gchar* _tmp2_;
+ gchar* _tmp1_;
gint res = 0;
- sqlite3* _tmp3_;
- const gchar* _tmp4_;
- sqlite3_stmt* _tmp5_ = NULL;
+ sqlite3* _tmp2_;
+ const gchar* _tmp3_;
+ sqlite3_stmt* _tmp4_ = NULL;
+ gint _tmp5_;
gint _tmp6_;
- gint _tmp7_;
- sqlite3_stmt* _tmp8_;
- gint64 _tmp9_;
- gint _tmp10_;
+ sqlite3_stmt* _tmp7_;
+ gint _tmp8_;
+ sqlite3_stmt* _tmp9_;
+ gboolean _tmp10_ = FALSE;
gint _tmp11_;
- sqlite3_stmt* _tmp12_;
- gint _tmp13_;
- gboolean _tmp14_ = FALSE;
- gint _tmp15_;
- gint _tmp25_;
+ gint _tmp19_;
#line 187 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (IS_DATABASE_TABLE (self), FALSE);
#line 187 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (columns != NULL, FALSE);
#line 188 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = columns;
-#line 188 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = self->table_name;
+ _tmp0_ = self->table_name;
#line 188 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp2_ = g_strdup_printf ("SELECT %s FROM %s WHERE id=?", _tmp0_, _tmp1_);
+ _tmp1_ = g_strdup_printf ("SELECT %s FROM %s WHERE id=?", columns, _tmp0_);
#line 188 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- sql = _tmp2_;
+ sql = _tmp1_;
#line 190 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = database_table_db;
+ _tmp2_ = database_table_db;
#line 190 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = sql;
+ _tmp3_ = sql;
#line 190 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = sqlite3_prepare_v2 (_tmp3_, _tmp4_, -1, &_tmp5_, NULL);
+ _tmp5_ = sqlite3_prepare_v2 (_tmp2_, _tmp3_, -1, &_tmp4_, NULL);
#line 190 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (_vala_stmt);
#line 190 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_stmt = _tmp5_;
+ _vala_stmt = _tmp4_;
#line 190 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp6_;
+ res = _tmp5_;
#line 191 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = res;
+ _tmp6_ = res;
#line 191 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp7_ == SQLITE_OK, "res == Sqlite.OK");
-#line 193 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = _vala_stmt;
-#line 193 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = id;
+ _vala_assert (_tmp6_ == SQLITE_OK, "res == Sqlite.OK");
#line 193 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = sqlite3_bind_int64 (_tmp8_, 1, _tmp9_);
+ _tmp7_ = _vala_stmt;
#line 193 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp10_;
+ res = sqlite3_bind_int64 (_tmp7_, 1, id);
#line 194 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = res;
+ _tmp8_ = res;
#line 194 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp11_ == SQLITE_OK, "res == Sqlite.OK");
-#line 196 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = _vala_stmt;
+ _vala_assert (_tmp8_ == SQLITE_OK, "res == Sqlite.OK");
#line 196 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = sqlite3_step (_tmp12_);
+ _tmp9_ = _vala_stmt;
#line 196 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp13_;
+ res = sqlite3_step (_tmp9_);
#line 197 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp15_ = res;
+ _tmp11_ = res;
#line 197 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp15_ != SQLITE_ROW) {
-#line 1106 "DatabaseTable.c"
- gint _tmp16_;
+ if (_tmp11_ != SQLITE_ROW) {
+#line 1100 "DatabaseTable.c"
+ gint _tmp12_;
#line 197 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp16_ = res;
+ _tmp12_ = res;
#line 197 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = _tmp16_ != SQLITE_DONE;
-#line 1112 "DatabaseTable.c"
+ _tmp10_ = _tmp12_ != SQLITE_DONE;
+#line 1106 "DatabaseTable.c"
} else {
#line 197 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = FALSE;
-#line 1116 "DatabaseTable.c"
+ _tmp10_ = FALSE;
+#line 1110 "DatabaseTable.c"
}
#line 197 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp14_) {
-#line 1120 "DatabaseTable.c"
- gint64 _tmp17_;
- gchar* _tmp18_;
- gchar* _tmp19_;
- const gchar* _tmp20_;
- const gchar* _tmp21_;
- gchar* _tmp22_;
- gchar* _tmp23_;
- gint _tmp24_;
-#line 198 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp17_ = id;
-#line 198 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp18_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp17_);
+ if (_tmp10_) {
+#line 1114 "DatabaseTable.c"
+ gchar* _tmp13_;
+ gchar* _tmp14_;
+ const gchar* _tmp15_;
+ gchar* _tmp16_;
+ gchar* _tmp17_;
+ gint _tmp18_;
#line 198 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp19_ = _tmp18_;
+ _tmp13_ = g_strdup_printf ("%" G_GINT64_FORMAT, id);
#line 198 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp20_ = self->table_name;
+ _tmp14_ = _tmp13_;
#line 198 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp21_ = columns;
+ _tmp15_ = self->table_name;
#line 198 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp22_ = g_strdup_printf ("select_by_id [%s] %s %s", _tmp19_, _tmp20_, _tmp21_);
+ _tmp16_ = g_strdup_printf ("select_by_id [%s] %s %s", _tmp14_, _tmp15_, columns);
#line 198 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp23_ = _tmp22_;
+ _tmp17_ = _tmp16_;
#line 198 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp24_ = res;
+ _tmp18_ = res;
#line 198 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_fatal (_tmp23_, _tmp24_);
+ database_table_fatal (_tmp17_, _tmp18_);
#line 198 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp23_);
+ _g_free0 (_tmp17_);
#line 198 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp19_);
-#line 1151 "DatabaseTable.c"
+ _g_free0 (_tmp14_);
+#line 1139 "DatabaseTable.c"
}
#line 200 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp25_ = res;
+ _tmp19_ = res;
#line 200 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- result = _tmp25_ == SQLITE_ROW;
+ result = _tmp19_ == SQLITE_ROW;
#line 200 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (sql);
#line 200 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (stmt) {
#line 200 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
*stmt = _vala_stmt;
-#line 1163 "DatabaseTable.c"
+#line 1151 "DatabaseTable.c"
} else {
#line 200 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (_vala_stmt);
-#line 1167 "DatabaseTable.c"
+#line 1155 "DatabaseTable.c"
}
#line 200 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 1171 "DatabaseTable.c"
+#line 1159 "DatabaseTable.c"
}
-static void database_table_prepare_update_by_id (DatabaseTable* self, gint64 id, const gchar* column, sqlite3_stmt* * stmt) {
+static void
+database_table_prepare_update_by_id (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ sqlite3_stmt* * stmt)
+{
sqlite3_stmt* _vala_stmt = NULL;
gchar* sql = NULL;
const gchar* _tmp0_;
- const gchar* _tmp1_;
- gchar* _tmp2_;
+ gchar* _tmp1_;
gint res = 0;
- sqlite3* _tmp3_;
- sqlite3_stmt* _tmp4_ = NULL;
+ sqlite3* _tmp2_;
+ sqlite3_stmt* _tmp3_ = NULL;
+ gint _tmp4_;
gint _tmp5_;
gint _tmp6_;
- gint64 _tmp7_;
- gint _tmp8_;
- gint _tmp9_;
#line 204 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (IS_DATABASE_TABLE (self));
#line 204 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -1192,102 +1182,93 @@ static void database_table_prepare_update_by_id (DatabaseTable* self, gint64 id,
#line 205 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_tmp0_ = self->table_name;
#line 205 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = column;
-#line 205 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp2_ = g_strdup_printf ("UPDATE %s SET %s=? WHERE id=?", _tmp0_, _tmp1_);
+ _tmp1_ = g_strdup_printf ("UPDATE %s SET %s=? WHERE id=?", _tmp0_, column);
#line 205 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- sql = _tmp2_;
+ sql = _tmp1_;
#line 207 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = database_table_db;
+ _tmp2_ = database_table_db;
#line 207 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = sqlite3_prepare_v2 (_tmp3_, sql, -1, &_tmp4_, NULL);
+ _tmp4_ = sqlite3_prepare_v2 (_tmp2_, sql, -1, &_tmp3_, NULL);
#line 207 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (_vala_stmt);
#line 207 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_stmt = _tmp4_;
+ _vala_stmt = _tmp3_;
#line 207 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp5_;
+ res = _tmp4_;
#line 208 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = res;
+ _tmp5_ = res;
#line 208 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp6_ == SQLITE_OK, "res == Sqlite.OK");
-#line 210 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = id;
+ _vala_assert (_tmp5_ == SQLITE_OK, "res == Sqlite.OK");
#line 210 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = sqlite3_bind_int64 (_vala_stmt, 2, _tmp7_);
-#line 210 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp8_;
+ res = sqlite3_bind_int64 (_vala_stmt, 2, id);
#line 211 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = res;
+ _tmp6_ = res;
#line 211 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp9_ == SQLITE_OK, "res == Sqlite.OK");
+ _vala_assert (_tmp6_ == SQLITE_OK, "res == Sqlite.OK");
#line 204 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (sql);
#line 204 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (stmt) {
#line 204 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
*stmt = _vala_stmt;
-#line 1231 "DatabaseTable.c"
+#line 1215 "DatabaseTable.c"
} else {
#line 204 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (_vala_stmt);
-#line 1235 "DatabaseTable.c"
+#line 1219 "DatabaseTable.c"
}
}
-static gboolean database_table_execute_update_by_id (DatabaseTable* self, sqlite3_stmt* stmt) {
+static gboolean
+database_table_execute_update_by_id (DatabaseTable* self,
+ sqlite3_stmt* stmt)
+{
gboolean result = FALSE;
gint res = 0;
- sqlite3_stmt* _tmp0_;
- gint _tmp1_;
- gint _tmp2_;
+ gint _tmp0_;
#line 214 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (IS_DATABASE_TABLE (self), FALSE);
#line 214 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (stmt != NULL, FALSE);
#line 215 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = stmt;
-#line 215 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = sqlite3_step (_tmp0_);
-#line 215 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp1_;
+ res = sqlite3_step (stmt);
#line 216 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp2_ = res;
+ _tmp0_ = res;
#line 216 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp2_ != SQLITE_DONE) {
-#line 1260 "DatabaseTable.c"
- gint _tmp3_;
+ if (_tmp0_ != SQLITE_DONE) {
+#line 1241 "DatabaseTable.c"
+ gint _tmp1_;
#line 217 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = res;
+ _tmp1_ = res;
#line 217 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_fatal ("execute_update_by_id", _tmp3_);
+ database_table_fatal ("execute_update_by_id", _tmp1_);
#line 219 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
result = FALSE;
#line 219 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 1270 "DatabaseTable.c"
+#line 1251 "DatabaseTable.c"
}
#line 222 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
result = TRUE;
#line 222 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 1276 "DatabaseTable.c"
+#line 1257 "DatabaseTable.c"
}
-gboolean database_table_update_text_by_id (DatabaseTable* self, gint64 id, const gchar* column, const gchar* text) {
+gboolean
+database_table_update_text_by_id (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ const gchar* text)
+{
gboolean result = FALSE;
sqlite3_stmt* stmt = NULL;
- gint64 _tmp0_;
- const gchar* _tmp1_;
- sqlite3_stmt* _tmp2_ = NULL;
+ sqlite3_stmt* _tmp0_ = NULL;
gint res = 0;
- const gchar* _tmp3_;
- gchar* _tmp4_;
- GDestroyNotify _tmp5_;
- gint _tmp6_;
- gboolean _tmp7_;
+ gchar* _tmp1_;
+ GDestroyNotify _tmp2_;
#line 225 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (IS_DATABASE_TABLE (self), FALSE);
#line 225 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -1295,54 +1276,45 @@ gboolean database_table_update_text_by_id (DatabaseTable* self, gint64 id, const
#line 225 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (text != NULL, FALSE);
#line 227 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = id;
-#line 227 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = column;
-#line 227 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_prepare_update_by_id (self, _tmp0_, _tmp1_, &_tmp2_);
+ database_table_prepare_update_by_id (self, id, column, &_tmp0_);
#line 227 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 227 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- stmt = _tmp2_;
-#line 229 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = text;
-#line 229 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = g_strdup (_tmp3_);
+ stmt = _tmp0_;
#line 229 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = g_free;
+ _tmp1_ = g_strdup (text);
#line 229 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = sqlite3_bind_text (stmt, 1, _tmp4_, -1, _tmp5_);
+ _tmp2_ = g_free;
#line 229 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp6_;
+ res = sqlite3_bind_text (stmt, 1, _tmp1_, -1, _tmp2_);
#line 230 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_vala_assert (res == SQLITE_OK, "res == Sqlite.OK");
#line 232 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = database_table_execute_update_by_id (self, stmt);
-#line 232 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- result = _tmp7_;
+ result = database_table_execute_update_by_id (self, stmt);
#line 232 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 232 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 1328 "DatabaseTable.c"
+#line 1299 "DatabaseTable.c"
}
-void database_table_update_text_by_id_2 (DatabaseTable* self, gint64 id, const gchar* column, const gchar* text, GError** error) {
+void
+database_table_update_text_by_id_2 (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ const gchar* text,
+ GError** error)
+{
sqlite3_stmt* stmt = NULL;
- gint64 _tmp0_;
- const gchar* _tmp1_;
- sqlite3_stmt* _tmp2_ = NULL;
+ sqlite3_stmt* _tmp0_ = NULL;
gint res = 0;
- sqlite3_stmt* _tmp3_;
- const gchar* _tmp4_;
- gchar* _tmp5_;
- GDestroyNotify _tmp6_;
- gint _tmp7_;
- gint _tmp8_;
- sqlite3_stmt* _tmp9_;
- gint _tmp10_;
- gint _tmp11_;
+ sqlite3_stmt* _tmp1_;
+ gchar* _tmp2_;
+ GDestroyNotify _tmp3_;
+ gint _tmp4_;
+ sqlite3_stmt* _tmp5_;
+ gint _tmp6_;
GError * _inner_error_ = NULL;
#line 235 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (IS_DATABASE_TABLE (self));
@@ -1351,61 +1323,48 @@ void database_table_update_text_by_id_2 (DatabaseTable* self, gint64 id, const g
#line 235 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (text != NULL);
#line 237 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = id;
-#line 237 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = column;
-#line 237 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_prepare_update_by_id (self, _tmp0_, _tmp1_, &_tmp2_);
+ database_table_prepare_update_by_id (self, id, column, &_tmp0_);
#line 237 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 237 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- stmt = _tmp2_;
-#line 239 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = stmt;
+ stmt = _tmp0_;
#line 239 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = text;
+ _tmp1_ = stmt;
#line 239 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = g_strdup (_tmp4_);
+ _tmp2_ = g_strdup (text);
#line 239 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = g_free;
+ _tmp3_ = g_free;
#line 239 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = sqlite3_bind_text (_tmp3_, 1, _tmp5_, -1, _tmp6_);
-#line 239 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp7_;
+ res = sqlite3_bind_text (_tmp1_, 1, _tmp2_, -1, _tmp3_);
#line 240 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = res;
+ _tmp4_ = res;
#line 240 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp8_ == SQLITE_OK, "res == Sqlite.OK");
+ _vala_assert (_tmp4_ == SQLITE_OK, "res == Sqlite.OK");
#line 242 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = stmt;
+ _tmp5_ = stmt;
#line 242 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = sqlite3_step (_tmp9_);
-#line 242 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp10_;
+ res = sqlite3_step (_tmp5_);
#line 243 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = res;
+ _tmp6_ = res;
#line 243 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp11_ != SQLITE_DONE) {
-#line 1390 "DatabaseTable.c"
- const gchar* _tmp12_;
- const gchar* _tmp13_;
- gchar* _tmp14_;
- gchar* _tmp15_;
- gint _tmp16_;
+ if (_tmp6_ != SQLITE_DONE) {
+#line 1352 "DatabaseTable.c"
+ const gchar* _tmp7_;
+ gchar* _tmp8_;
+ gchar* _tmp9_;
+ gint _tmp10_;
#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = self->table_name;
+ _tmp7_ = self->table_name;
#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = column;
+ _tmp8_ = g_strdup_printf ("DatabaseTable.update_text_by_id_2 %s.%s", _tmp7_, column);
#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = g_strdup_printf ("DatabaseTable.update_text_by_id_2 %s.%s", _tmp12_, _tmp13_);
+ _tmp9_ = _tmp8_;
#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp15_ = _tmp14_;
+ _tmp10_ = res;
#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp16_ = res;
+ database_table_throw_error (_tmp9_, _tmp10_, &_inner_error_);
#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_throw_error (_tmp15_, _tmp16_, &_inner_error_);
-#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp15_);
+ _g_free0 (_tmp9_);
#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -1416,7 +1375,7 @@ void database_table_update_text_by_id_2 (DatabaseTable* self, gint64 id, const g
_sqlite3_finalize0 (stmt);
#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 1420 "DatabaseTable.c"
+#line 1379 "DatabaseTable.c"
} else {
#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
@@ -1426,130 +1385,108 @@ void database_table_update_text_by_id_2 (DatabaseTable* self, gint64 id, const g
g_clear_error (&_inner_error_);
#line 244 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 1430 "DatabaseTable.c"
+#line 1389 "DatabaseTable.c"
}
}
}
#line 235 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
-#line 1436 "DatabaseTable.c"
+#line 1395 "DatabaseTable.c"
}
-gboolean database_table_update_int_by_id (DatabaseTable* self, gint64 id, const gchar* column, gint value) {
+gboolean
+database_table_update_int_by_id (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ gint value)
+{
gboolean result = FALSE;
sqlite3_stmt* stmt = NULL;
- gint64 _tmp0_;
- const gchar* _tmp1_;
- sqlite3_stmt* _tmp2_ = NULL;
+ sqlite3_stmt* _tmp0_ = NULL;
gint res = 0;
- gint _tmp3_;
- gint _tmp4_;
- gboolean _tmp5_;
#line 247 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (IS_DATABASE_TABLE (self), FALSE);
#line 247 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (column != NULL, FALSE);
#line 249 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = id;
-#line 249 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = column;
-#line 249 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_prepare_update_by_id (self, _tmp0_, _tmp1_, &_tmp2_);
+ database_table_prepare_update_by_id (self, id, column, &_tmp0_);
#line 249 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 249 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- stmt = _tmp2_;
-#line 251 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = value;
-#line 251 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = sqlite3_bind_int (stmt, 1, _tmp3_);
+ stmt = _tmp0_;
#line 251 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp4_;
+ res = sqlite3_bind_int (stmt, 1, value);
#line 252 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_vala_assert (res == SQLITE_OK, "res == Sqlite.OK");
#line 254 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = database_table_execute_update_by_id (self, stmt);
-#line 254 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- result = _tmp5_;
+ result = database_table_execute_update_by_id (self, stmt);
#line 254 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 254 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 1480 "DatabaseTable.c"
+#line 1429 "DatabaseTable.c"
}
-void database_table_update_int_by_id_2 (DatabaseTable* self, gint64 id, const gchar* column, gint value, GError** error) {
+void
+database_table_update_int_by_id_2 (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ gint value,
+ GError** error)
+{
sqlite3_stmt* stmt = NULL;
- gint64 _tmp0_;
- const gchar* _tmp1_;
- sqlite3_stmt* _tmp2_ = NULL;
+ sqlite3_stmt* _tmp0_ = NULL;
gint res = 0;
+ sqlite3_stmt* _tmp1_;
+ gint _tmp2_;
sqlite3_stmt* _tmp3_;
gint _tmp4_;
- gint _tmp5_;
- gint _tmp6_;
- sqlite3_stmt* _tmp7_;
- gint _tmp8_;
- gint _tmp9_;
GError * _inner_error_ = NULL;
#line 257 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (IS_DATABASE_TABLE (self));
#line 257 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (column != NULL);
#line 259 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = id;
-#line 259 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = column;
-#line 259 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_prepare_update_by_id (self, _tmp0_, _tmp1_, &_tmp2_);
+ database_table_prepare_update_by_id (self, id, column, &_tmp0_);
#line 259 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 259 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- stmt = _tmp2_;
+ stmt = _tmp0_;
#line 261 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = stmt;
-#line 261 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = value;
+ _tmp1_ = stmt;
#line 261 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = sqlite3_bind_int (_tmp3_, 1, _tmp4_);
-#line 261 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp5_;
+ res = sqlite3_bind_int (_tmp1_, 1, value);
#line 262 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = res;
+ _tmp2_ = res;
#line 262 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp6_ == SQLITE_OK, "res == Sqlite.OK");
+ _vala_assert (_tmp2_ == SQLITE_OK, "res == Sqlite.OK");
#line 264 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = stmt;
-#line 264 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = sqlite3_step (_tmp7_);
+ _tmp3_ = stmt;
#line 264 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp8_;
+ res = sqlite3_step (_tmp3_);
#line 265 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = res;
+ _tmp4_ = res;
#line 265 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp9_ != SQLITE_DONE) {
-#line 1534 "DatabaseTable.c"
- const gchar* _tmp10_;
- const gchar* _tmp11_;
- gchar* _tmp12_;
- gchar* _tmp13_;
- gint _tmp14_;
-#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = self->table_name;
+ if (_tmp4_ != SQLITE_DONE) {
+#line 1474 "DatabaseTable.c"
+ const gchar* _tmp5_;
+ gchar* _tmp6_;
+ gchar* _tmp7_;
+ gint _tmp8_;
#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = column;
+ _tmp5_ = self->table_name;
#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = g_strdup_printf ("DatabaseTable.update_int_by_id_2 %s.%s", _tmp10_, _tmp11_);
+ _tmp6_ = g_strdup_printf ("DatabaseTable.update_int_by_id_2 %s.%s", _tmp5_, column);
#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = _tmp12_;
+ _tmp7_ = _tmp6_;
#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = res;
+ _tmp8_ = res;
#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_throw_error (_tmp13_, _tmp14_, &_inner_error_);
+ database_table_throw_error (_tmp7_, _tmp8_, &_inner_error_);
#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp13_);
+ _g_free0 (_tmp7_);
#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -1560,7 +1497,7 @@ void database_table_update_int_by_id_2 (DatabaseTable* self, gint64 id, const gc
_sqlite3_finalize0 (stmt);
#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 1564 "DatabaseTable.c"
+#line 1501 "DatabaseTable.c"
} else {
#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
@@ -1570,130 +1507,108 @@ void database_table_update_int_by_id_2 (DatabaseTable* self, gint64 id, const gc
g_clear_error (&_inner_error_);
#line 266 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 1574 "DatabaseTable.c"
+#line 1511 "DatabaseTable.c"
}
}
}
#line 257 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
-#line 1580 "DatabaseTable.c"
+#line 1517 "DatabaseTable.c"
}
-gboolean database_table_update_int64_by_id (DatabaseTable* self, gint64 id, const gchar* column, gint64 value) {
+gboolean
+database_table_update_int64_by_id (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ gint64 value)
+{
gboolean result = FALSE;
sqlite3_stmt* stmt = NULL;
- gint64 _tmp0_;
- const gchar* _tmp1_;
- sqlite3_stmt* _tmp2_ = NULL;
+ sqlite3_stmt* _tmp0_ = NULL;
gint res = 0;
- gint64 _tmp3_;
- gint _tmp4_;
- gboolean _tmp5_;
#line 269 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (IS_DATABASE_TABLE (self), FALSE);
#line 269 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (column != NULL, FALSE);
#line 271 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = id;
-#line 271 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = column;
-#line 271 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_prepare_update_by_id (self, _tmp0_, _tmp1_, &_tmp2_);
+ database_table_prepare_update_by_id (self, id, column, &_tmp0_);
#line 271 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 271 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- stmt = _tmp2_;
-#line 273 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = value;
+ stmt = _tmp0_;
#line 273 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = sqlite3_bind_int64 (stmt, 1, _tmp3_);
-#line 273 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp4_;
+ res = sqlite3_bind_int64 (stmt, 1, value);
#line 274 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_vala_assert (res == SQLITE_OK, "res == Sqlite.OK");
#line 276 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = database_table_execute_update_by_id (self, stmt);
-#line 276 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- result = _tmp5_;
+ result = database_table_execute_update_by_id (self, stmt);
#line 276 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 276 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 1624 "DatabaseTable.c"
+#line 1551 "DatabaseTable.c"
}
-void database_table_update_int64_by_id_2 (DatabaseTable* self, gint64 id, const gchar* column, gint64 value, GError** error) {
+void
+database_table_update_int64_by_id_2 (DatabaseTable* self,
+ gint64 id,
+ const gchar* column,
+ gint64 value,
+ GError** error)
+{
sqlite3_stmt* stmt = NULL;
- gint64 _tmp0_;
- const gchar* _tmp1_;
- sqlite3_stmt* _tmp2_ = NULL;
+ sqlite3_stmt* _tmp0_ = NULL;
gint res = 0;
+ sqlite3_stmt* _tmp1_;
+ gint _tmp2_;
sqlite3_stmt* _tmp3_;
- gint64 _tmp4_;
- gint _tmp5_;
- gint _tmp6_;
- sqlite3_stmt* _tmp7_;
- gint _tmp8_;
- gint _tmp9_;
+ gint _tmp4_;
GError * _inner_error_ = NULL;
#line 279 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (IS_DATABASE_TABLE (self));
#line 279 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (column != NULL);
#line 281 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = id;
-#line 281 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = column;
-#line 281 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_prepare_update_by_id (self, _tmp0_, _tmp1_, &_tmp2_);
+ database_table_prepare_update_by_id (self, id, column, &_tmp0_);
#line 281 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 281 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- stmt = _tmp2_;
-#line 283 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = stmt;
+ stmt = _tmp0_;
#line 283 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = value;
+ _tmp1_ = stmt;
#line 283 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = sqlite3_bind_int64 (_tmp3_, 1, _tmp4_);
-#line 283 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp5_;
+ res = sqlite3_bind_int64 (_tmp1_, 1, value);
#line 284 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = res;
+ _tmp2_ = res;
#line 284 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp6_ == SQLITE_OK, "res == Sqlite.OK");
-#line 286 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = stmt;
+ _vala_assert (_tmp2_ == SQLITE_OK, "res == Sqlite.OK");
#line 286 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = sqlite3_step (_tmp7_);
+ _tmp3_ = stmt;
#line 286 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp8_;
+ res = sqlite3_step (_tmp3_);
#line 287 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = res;
+ _tmp4_ = res;
#line 287 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp9_ != SQLITE_DONE) {
-#line 1678 "DatabaseTable.c"
- const gchar* _tmp10_;
- const gchar* _tmp11_;
- gchar* _tmp12_;
- gchar* _tmp13_;
- gint _tmp14_;
-#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = self->table_name;
+ if (_tmp4_ != SQLITE_DONE) {
+#line 1596 "DatabaseTable.c"
+ const gchar* _tmp5_;
+ gchar* _tmp6_;
+ gchar* _tmp7_;
+ gint _tmp8_;
#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = column;
+ _tmp5_ = self->table_name;
#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = g_strdup_printf ("DatabaseTable.update_int64_by_id_2 %s.%s", _tmp10_, _tmp11_);
+ _tmp6_ = g_strdup_printf ("DatabaseTable.update_int64_by_id_2 %s.%s", _tmp5_, column);
#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = _tmp12_;
+ _tmp7_ = _tmp6_;
#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = res;
+ _tmp8_ = res;
#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_throw_error (_tmp13_, _tmp14_, &_inner_error_);
+ database_table_throw_error (_tmp7_, _tmp8_, &_inner_error_);
#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp13_);
+ _g_free0 (_tmp7_);
#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -1704,7 +1619,7 @@ void database_table_update_int64_by_id_2 (DatabaseTable* self, gint64 id, const
_sqlite3_finalize0 (stmt);
#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 1708 "DatabaseTable.c"
+#line 1623 "DatabaseTable.c"
} else {
#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
@@ -1714,17 +1629,21 @@ void database_table_update_int64_by_id_2 (DatabaseTable* self, gint64 id, const
g_clear_error (&_inner_error_);
#line 288 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 1718 "DatabaseTable.c"
+#line 1633 "DatabaseTable.c"
}
}
}
#line 279 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
-#line 1724 "DatabaseTable.c"
+#line 1639 "DatabaseTable.c"
}
-void database_table_delete_by_id (DatabaseTable* self, gint64 id, GError** error) {
+void
+database_table_delete_by_id (DatabaseTable* self,
+ gint64 id,
+ GError** error)
+{
sqlite3_stmt* stmt = NULL;
gint res = 0;
sqlite3* _tmp0_;
@@ -1736,12 +1655,9 @@ void database_table_delete_by_id (DatabaseTable* self, gint64 id, GError** error
gint _tmp6_;
gint _tmp7_;
sqlite3_stmt* _tmp8_;
- gint64 _tmp9_;
- gint _tmp10_;
+ gint _tmp9_;
+ sqlite3_stmt* _tmp10_;
gint _tmp11_;
- sqlite3_stmt* _tmp12_;
- gint _tmp13_;
- gint _tmp14_;
GError * _inner_error_ = NULL;
#line 291 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (IS_DATABASE_TABLE (self));
@@ -1772,42 +1688,36 @@ void database_table_delete_by_id (DatabaseTable* self, gint64 id, GError** error
#line 296 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_tmp8_ = stmt;
#line 296 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = id;
-#line 296 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = sqlite3_bind_int64 (_tmp8_, 1, _tmp9_);
-#line 296 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp10_;
+ res = sqlite3_bind_int64 (_tmp8_, 1, id);
#line 297 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = res;
+ _tmp9_ = res;
#line 297 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp11_ == SQLITE_OK, "res == Sqlite.OK");
-#line 299 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = stmt;
+ _vala_assert (_tmp9_ == SQLITE_OK, "res == Sqlite.OK");
#line 299 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = sqlite3_step (_tmp12_);
+ _tmp10_ = stmt;
#line 299 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp13_;
+ res = sqlite3_step (_tmp10_);
#line 300 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = res;
+ _tmp11_ = res;
#line 300 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp14_ != SQLITE_DONE) {
-#line 1795 "DatabaseTable.c"
- const gchar* _tmp15_;
- gchar* _tmp16_;
- gchar* _tmp17_;
- gint _tmp18_;
+ if (_tmp11_ != SQLITE_DONE) {
+#line 1705 "DatabaseTable.c"
+ const gchar* _tmp12_;
+ gchar* _tmp13_;
+ gchar* _tmp14_;
+ gint _tmp15_;
#line 301 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp15_ = self->table_name;
+ _tmp12_ = self->table_name;
#line 301 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp16_ = g_strdup_printf ("%s.remove", _tmp15_);
+ _tmp13_ = g_strdup_printf ("%s.remove", _tmp12_);
#line 301 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp17_ = _tmp16_;
+ _tmp14_ = _tmp13_;
#line 301 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp18_ = res;
+ _tmp15_ = res;
#line 301 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_throw_error (_tmp17_, _tmp18_, &_inner_error_);
+ database_table_throw_error (_tmp14_, _tmp15_, &_inner_error_);
#line 301 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp17_);
+ _g_free0 (_tmp14_);
#line 301 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 301 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -1818,7 +1728,7 @@ void database_table_delete_by_id (DatabaseTable* self, gint64 id, GError** error
_sqlite3_finalize0 (stmt);
#line 301 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 1822 "DatabaseTable.c"
+#line 1732 "DatabaseTable.c"
} else {
#line 301 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
@@ -1828,28 +1738,30 @@ void database_table_delete_by_id (DatabaseTable* self, gint64 id, GError** error
g_clear_error (&_inner_error_);
#line 301 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 1832 "DatabaseTable.c"
+#line 1742 "DatabaseTable.c"
}
}
}
#line 291 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
-#line 1838 "DatabaseTable.c"
+#line 1748 "DatabaseTable.c"
}
-gboolean database_table_has_column (const gchar* table_name, const gchar* column_name) {
+gboolean
+database_table_has_column (const gchar* table_name,
+ const gchar* column_name)
+{
gboolean result = FALSE;
sqlite3_stmt* stmt = NULL;
gint res = 0;
sqlite3* _tmp0_;
- const gchar* _tmp1_;
+ gchar* _tmp1_;
gchar* _tmp2_;
- gchar* _tmp3_;
- sqlite3_stmt* _tmp4_ = NULL;
+ sqlite3_stmt* _tmp3_ = NULL;
+ gint _tmp4_;
gint _tmp5_;
gint _tmp6_;
- gint _tmp7_;
#line 304 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (table_name != NULL, FALSE);
#line 304 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -1857,119 +1769,108 @@ gboolean database_table_has_column (const gchar* table_name, const gchar* column
#line 306 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_tmp0_ = database_table_db;
#line 306 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = table_name;
-#line 306 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp2_ = g_strdup_printf ("PRAGMA table_info(%s)", _tmp1_);
+ _tmp1_ = g_strdup_printf ("PRAGMA table_info(%s)", table_name);
#line 306 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = _tmp2_;
+ _tmp2_ = _tmp1_;
#line 306 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = sqlite3_prepare_v2 (_tmp0_, _tmp3_, -1, &_tmp4_, NULL);
+ _tmp4_ = sqlite3_prepare_v2 (_tmp0_, _tmp2_, -1, &_tmp3_, NULL);
#line 306 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 306 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- stmt = _tmp4_;
+ stmt = _tmp3_;
#line 306 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = _tmp5_;
+ _tmp5_ = _tmp4_;
#line 306 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp3_);
+ _g_free0 (_tmp2_);
#line 306 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp6_;
+ res = _tmp5_;
#line 307 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = res;
+ _tmp6_ = res;
#line 307 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp7_ == SQLITE_OK, "res == Sqlite.OK");
-#line 1882 "DatabaseTable.c"
+ _vala_assert (_tmp6_ == SQLITE_OK, "res == Sqlite.OK");
+#line 1792 "DatabaseTable.c"
{
- gboolean _tmp8_ = FALSE;
+ gboolean _tmp7_ = FALSE;
#line 309 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = TRUE;
+ _tmp7_ = TRUE;
#line 309 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
while (TRUE) {
-#line 1889 "DatabaseTable.c"
- sqlite3_stmt* _tmp9_;
- gint _tmp10_;
- gint _tmp11_;
+#line 1799 "DatabaseTable.c"
+ sqlite3_stmt* _tmp8_;
+ gint _tmp9_;
#line 309 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (!_tmp8_) {
-#line 1895 "DatabaseTable.c"
+ if (!_tmp7_) {
+#line 1804 "DatabaseTable.c"
}
#line 309 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = FALSE;
-#line 310 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = stmt;
+ _tmp7_ = FALSE;
#line 310 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = sqlite3_step (_tmp9_);
+ _tmp8_ = stmt;
#line 310 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp10_;
+ res = sqlite3_step (_tmp8_);
#line 311 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = res;
+ _tmp9_ = res;
#line 311 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp11_ == SQLITE_DONE) {
+ if (_tmp9_ == SQLITE_DONE) {
#line 312 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
break;
-#line 1911 "DatabaseTable.c"
+#line 1818 "DatabaseTable.c"
} else {
- gint _tmp12_;
+ gint _tmp10_;
#line 313 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = res;
+ _tmp10_ = res;
#line 313 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp12_ != SQLITE_ROW) {
-#line 1918 "DatabaseTable.c"
- const gchar* _tmp13_;
- gchar* _tmp14_;
- gchar* _tmp15_;
- gint _tmp16_;
+ if (_tmp10_ != SQLITE_ROW) {
+#line 1825 "DatabaseTable.c"
+ gchar* _tmp11_;
+ gchar* _tmp12_;
+ gint _tmp13_;
#line 314 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = table_name;
+ _tmp11_ = g_strdup_printf ("has_column %s", table_name);
#line 314 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = g_strdup_printf ("has_column %s", _tmp13_);
+ _tmp12_ = _tmp11_;
#line 314 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp15_ = _tmp14_;
+ _tmp13_ = res;
#line 314 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp16_ = res;
+ database_table_fatal (_tmp12_, _tmp13_);
#line 314 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- database_table_fatal (_tmp15_, _tmp16_);
-#line 314 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp15_);
+ _g_free0 (_tmp12_);
#line 316 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
break;
-#line 1937 "DatabaseTable.c"
+#line 1841 "DatabaseTable.c"
} else {
gchar* column = NULL;
- sqlite3_stmt* _tmp17_;
+ sqlite3_stmt* _tmp14_;
+ const gchar* _tmp15_;
+ gchar* _tmp16_;
+ gboolean _tmp17_ = FALSE;
const gchar* _tmp18_;
- gchar* _tmp19_;
- gboolean _tmp20_ = FALSE;
- const gchar* _tmp21_;
#line 318 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp17_ = stmt;
+ _tmp14_ = stmt;
#line 318 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp18_ = sqlite3_column_text (_tmp17_, 1);
+ _tmp15_ = sqlite3_column_text (_tmp14_, 1);
#line 318 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp19_ = g_strdup (_tmp18_);
+ _tmp16_ = g_strdup (_tmp15_);
#line 318 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- column = _tmp19_;
-#line 319 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp21_ = column;
+ column = _tmp16_;
#line 319 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp21_ != NULL) {
-#line 1957 "DatabaseTable.c"
- const gchar* _tmp22_;
- const gchar* _tmp23_;
+ _tmp18_ = column;
#line 319 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp22_ = column;
+ if (_tmp18_ != NULL) {
+#line 1861 "DatabaseTable.c"
+ const gchar* _tmp19_;
#line 319 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp23_ = column_name;
+ _tmp19_ = column;
#line 319 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp20_ = g_strcmp0 (_tmp22_, _tmp23_) == 0;
-#line 1966 "DatabaseTable.c"
+ _tmp17_ = g_strcmp0 (_tmp19_, column_name) == 0;
+#line 1867 "DatabaseTable.c"
} else {
#line 319 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp20_ = FALSE;
-#line 1970 "DatabaseTable.c"
+ _tmp17_ = FALSE;
+#line 1871 "DatabaseTable.c"
}
#line 319 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp20_) {
+ if (_tmp17_) {
#line 320 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
result = TRUE;
#line 320 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -1978,11 +1879,11 @@ gboolean database_table_has_column (const gchar* table_name, const gchar* column
_sqlite3_finalize0 (stmt);
#line 320 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 1982 "DatabaseTable.c"
+#line 1883 "DatabaseTable.c"
}
#line 313 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (column);
-#line 1986 "DatabaseTable.c"
+#line 1887 "DatabaseTable.c"
}
}
}
@@ -1993,83 +1894,79 @@ gboolean database_table_has_column (const gchar* table_name, const gchar* column
_sqlite3_finalize0 (stmt);
#line 324 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 1997 "DatabaseTable.c"
+#line 1898 "DatabaseTable.c"
}
-gboolean database_table_has_table (const gchar* table_name) {
+gboolean
+database_table_has_table (const gchar* table_name)
+{
gboolean result = FALSE;
sqlite3_stmt* stmt = NULL;
gint res = 0;
sqlite3* _tmp0_;
- const gchar* _tmp1_;
+ gchar* _tmp1_;
gchar* _tmp2_;
- gchar* _tmp3_;
- sqlite3_stmt* _tmp4_ = NULL;
+ sqlite3_stmt* _tmp3_ = NULL;
+ gint _tmp4_;
gint _tmp5_;
gint _tmp6_;
gint _tmp7_;
- gint _tmp8_;
- gint _tmp9_;
#line 327 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (table_name != NULL, FALSE);
#line 329 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_tmp0_ = database_table_db;
#line 329 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = table_name;
+ _tmp1_ = g_strdup_printf ("PRAGMA table_info(%s)", table_name);
#line 329 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp2_ = g_strdup_printf ("PRAGMA table_info(%s)", _tmp1_);
+ _tmp2_ = _tmp1_;
#line 329 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = _tmp2_;
-#line 329 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = sqlite3_prepare_v2 (_tmp0_, _tmp3_, -1, &_tmp4_, NULL);
+ _tmp4_ = sqlite3_prepare_v2 (_tmp0_, _tmp2_, -1, &_tmp3_, NULL);
#line 329 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 329 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- stmt = _tmp4_;
+ stmt = _tmp3_;
#line 329 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = _tmp5_;
+ _tmp5_ = _tmp4_;
#line 329 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp3_);
+ _g_free0 (_tmp2_);
#line 329 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp6_;
+ res = _tmp5_;
#line 330 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = res;
+ _tmp6_ = res;
#line 330 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp7_ == SQLITE_OK, "res == Sqlite.OK");
-#line 332 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = sqlite3_step (stmt);
+ _vala_assert (_tmp6_ == SQLITE_OK, "res == Sqlite.OK");
#line 332 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp8_;
+ res = sqlite3_step (stmt);
#line 334 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = res;
+ _tmp7_ = res;
#line 334 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- result = _tmp9_ != SQLITE_DONE;
+ result = _tmp7_ != SQLITE_DONE;
#line 334 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 334 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 2053 "DatabaseTable.c"
+#line 1950 "DatabaseTable.c"
}
-gboolean database_table_add_column (const gchar* table_name, const gchar* column_name, const gchar* column_constraints) {
+gboolean
+database_table_add_column (const gchar* table_name,
+ const gchar* column_name,
+ const gchar* column_constraints)
+{
gboolean result = FALSE;
sqlite3_stmt* stmt = NULL;
gint res = 0;
sqlite3* _tmp0_;
- const gchar* _tmp1_;
- const gchar* _tmp2_;
- const gchar* _tmp3_;
- gchar* _tmp4_;
- gchar* _tmp5_;
- sqlite3_stmt* _tmp6_ = NULL;
- gint _tmp7_;
+ gchar* _tmp1_;
+ gchar* _tmp2_;
+ sqlite3_stmt* _tmp3_ = NULL;
+ gint _tmp4_;
+ gint _tmp5_;
+ gint _tmp6_;
+ sqlite3_stmt* _tmp7_;
gint _tmp8_;
- gint _tmp9_;
- sqlite3_stmt* _tmp10_;
- gint _tmp11_;
- gint _tmp12_;
#line 337 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (table_name != NULL, FALSE);
#line 337 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -2079,69 +1976,52 @@ gboolean database_table_add_column (const gchar* table_name, const gchar* column
#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_tmp0_ = database_table_db;
#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = table_name;
+ _tmp1_ = g_strdup_printf ("ALTER TABLE %s ADD COLUMN %s %s", table_name, column_name, column_constraints);
#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp2_ = column_name;
+ _tmp2_ = _tmp1_;
#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = column_constraints;
-#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = g_strdup_printf ("ALTER TABLE %s ADD COLUMN %s %s", _tmp1_, _tmp2_, _tmp3_);
-#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = _tmp4_;
-#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = sqlite3_prepare_v2 (_tmp0_, _tmp5_, -1, &_tmp6_, NULL);
+ _tmp4_ = sqlite3_prepare_v2 (_tmp0_, _tmp2_, -1, &_tmp3_, NULL);
#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- stmt = _tmp6_;
+ stmt = _tmp3_;
#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = _tmp7_;
+ _tmp5_ = _tmp4_;
#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _g_free0 (_tmp5_);
+ _g_free0 (_tmp2_);
#line 339 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp8_;
+ res = _tmp5_;
#line 341 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = res;
+ _tmp6_ = res;
#line 341 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _vala_assert (_tmp9_ == SQLITE_OK, "res == Sqlite.OK");
-#line 343 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = stmt;
+ _vala_assert (_tmp6_ == SQLITE_OK, "res == Sqlite.OK");
#line 343 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = sqlite3_step (_tmp10_);
+ _tmp7_ = stmt;
#line 343 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp11_;
+ res = sqlite3_step (_tmp7_);
#line 344 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = res;
+ _tmp8_ = res;
#line 344 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp12_ != SQLITE_DONE) {
-#line 2118 "DatabaseTable.c"
- const gchar* _tmp13_;
- const gchar* _tmp14_;
- const gchar* _tmp15_;
- gint _tmp16_;
- sqlite3* _tmp17_;
- const gchar* _tmp18_;
-#line 345 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = table_name;
-#line 345 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = column_name;
-#line 345 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp15_ = column_constraints;
+ if (_tmp8_ != SQLITE_DONE) {
+#line 2007 "DatabaseTable.c"
+ gint _tmp9_;
+ sqlite3* _tmp10_;
+ const gchar* _tmp11_;
#line 345 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp16_ = res;
+ _tmp9_ = res;
#line 345 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp17_ = database_table_db;
+ _tmp10_ = database_table_db;
#line 345 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp18_ = sqlite3_errmsg (_tmp17_);
+ _tmp11_ = sqlite3_errmsg (_tmp10_);
#line 345 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- g_critical ("DatabaseTable.vala:345: Unable to add column %s %s %s: (%d) %s", _tmp13_, _tmp14_, _tmp15_, _tmp16_, _tmp18_);
+ g_critical ("DatabaseTable.vala:345: Unable to add column %s %s %s: (%d) %s", table_name, column_name, column_constraints, _tmp9_, _tmp11_);
#line 348 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
result = FALSE;
#line 348 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 348 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 2145 "DatabaseTable.c"
+#line 2025 "DatabaseTable.c"
}
#line 351 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
result = TRUE;
@@ -2149,20 +2029,18 @@ gboolean database_table_add_column (const gchar* table_name, const gchar* column
_sqlite3_finalize0 (stmt);
#line 351 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 2153 "DatabaseTable.c"
+#line 2033 "DatabaseTable.c"
}
-gboolean database_table_ensure_column (const gchar* table_name, const gchar* column_name, const gchar* column_constraints, const gchar* upgrade_msg) {
+gboolean
+database_table_ensure_column (const gchar* table_name,
+ const gchar* column_name,
+ const gchar* column_constraints,
+ const gchar* upgrade_msg)
+{
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
- const gchar* _tmp1_;
- gboolean _tmp2_;
- const gchar* _tmp6_;
- const gchar* _tmp7_;
- const gchar* _tmp8_;
- const gchar* _tmp9_;
- gboolean _tmp10_;
#line 357 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (table_name != NULL, FALSE);
#line 357 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -2172,27 +2050,14 @@ gboolean database_table_ensure_column (const gchar* table_name, const gchar* col
#line 357 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (upgrade_msg != NULL, FALSE);
#line 359 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp1_ = table_name;
-#line 359 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp2_ = database_table_has_table (_tmp1_);
-#line 359 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (!_tmp2_) {
+ if (!database_table_has_table (table_name)) {
#line 359 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_tmp0_ = TRUE;
-#line 2183 "DatabaseTable.c"
+#line 2057 "DatabaseTable.c"
} else {
- const gchar* _tmp3_;
- const gchar* _tmp4_;
- gboolean _tmp5_;
-#line 359 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp3_ = table_name;
-#line 359 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp4_ = column_name;
#line 359 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp5_ = database_table_has_column (_tmp3_, _tmp4_);
-#line 359 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp0_ = _tmp5_;
-#line 2196 "DatabaseTable.c"
+ _tmp0_ = database_table_has_column (table_name, column_name);
+#line 2061 "DatabaseTable.c"
}
#line 359 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (_tmp0_) {
@@ -2200,29 +2065,21 @@ gboolean database_table_ensure_column (const gchar* table_name, const gchar* col
result = TRUE;
#line 360 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 2204 "DatabaseTable.c"
+#line 2069 "DatabaseTable.c"
}
#line 362 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp6_ = upgrade_msg;
-#line 362 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- g_message ("DatabaseTable.vala:362: %s", _tmp6_);
-#line 364 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp7_ = table_name;
-#line 364 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp8_ = column_name;
+ g_message ("DatabaseTable.vala:362: %s", upgrade_msg);
#line 364 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = column_constraints;
-#line 364 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = database_table_add_column (_tmp7_, _tmp8_, _tmp9_);
-#line 364 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- result = _tmp10_;
+ result = database_table_add_column (table_name, column_name, column_constraints);
#line 364 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 2222 "DatabaseTable.c"
+#line 2077 "DatabaseTable.c"
}
-gint database_table_get_row_count (DatabaseTable* self) {
+gint
+database_table_get_row_count (DatabaseTable* self)
+{
gint result = 0;
sqlite3_stmt* stmt = NULL;
gint res = 0;
@@ -2236,9 +2093,7 @@ gint database_table_get_row_count (DatabaseTable* self) {
gint _tmp7_;
sqlite3_stmt* _tmp8_;
gint _tmp9_;
- gint _tmp10_;
- sqlite3_stmt* _tmp15_;
- gint _tmp16_;
+ sqlite3_stmt* _tmp14_;
#line 367 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (IS_DATABASE_TABLE (self), 0);
#line 369 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -2268,51 +2123,49 @@ gint database_table_get_row_count (DatabaseTable* self) {
#line 372 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_tmp8_ = stmt;
#line 372 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp9_ = sqlite3_step (_tmp8_);
-#line 372 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- res = _tmp9_;
+ res = sqlite3_step (_tmp8_);
#line 373 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp10_ = res;
+ _tmp9_ = res;
#line 373 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- if (_tmp10_ != SQLITE_ROW) {
-#line 2279 "DatabaseTable.c"
- const gchar* _tmp11_;
- gint _tmp12_;
- sqlite3* _tmp13_;
- const gchar* _tmp14_;
+ if (_tmp9_ != SQLITE_ROW) {
+#line 2132 "DatabaseTable.c"
+ const gchar* _tmp10_;
+ gint _tmp11_;
+ sqlite3* _tmp12_;
+ const gchar* _tmp13_;
#line 374 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp11_ = self->table_name;
+ _tmp10_ = self->table_name;
#line 374 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp12_ = res;
+ _tmp11_ = res;
#line 374 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp13_ = database_table_db;
+ _tmp12_ = database_table_db;
#line 374 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp14_ = sqlite3_errmsg (_tmp13_);
+ _tmp13_ = sqlite3_errmsg (_tmp12_);
#line 374 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- g_critical ("DatabaseTable.vala:374: Unable to retrieve row count on %s: (%d) %s", _tmp11_, _tmp12_, _tmp14_);
+ g_critical ("DatabaseTable.vala:374: Unable to retrieve row count on %s: (%d) %s", _tmp10_, _tmp11_, _tmp13_);
#line 376 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
result = 0;
#line 376 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 376 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 2300 "DatabaseTable.c"
+#line 2153 "DatabaseTable.c"
}
#line 379 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp15_ = stmt;
-#line 379 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- _tmp16_ = sqlite3_column_int (_tmp15_, 0);
+ _tmp14_ = stmt;
#line 379 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
- result = _tmp16_;
+ result = sqlite3_column_int (_tmp14_, 0);
#line 379 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_sqlite3_finalize0 (stmt);
#line 379 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return result;
-#line 2312 "DatabaseTable.c"
+#line 2163 "DatabaseTable.c"
}
-void database_table_begin_transaction (void) {
+void
+database_table_begin_transaction (void)
+{
gint _tmp0_;
gint res = 0;
sqlite3* _tmp1_;
@@ -2326,7 +2179,7 @@ void database_table_begin_transaction (void) {
if (_tmp0_ != 0) {
#line 385 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 2330 "DatabaseTable.c"
+#line 2183 "DatabaseTable.c"
}
#line 387 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_tmp1_ = database_table_db;
@@ -2338,11 +2191,13 @@ void database_table_begin_transaction (void) {
_tmp3_ = res;
#line 388 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_vala_assert (_tmp3_ == SQLITE_OK, "res == Sqlite.OK");
-#line 2342 "DatabaseTable.c"
+#line 2195 "DatabaseTable.c"
}
-void database_table_commit_transaction (GError** error) {
+void
+database_table_commit_transaction (GError** error)
+{
gint _tmp0_;
gint _tmp1_;
gint _tmp2_;
@@ -2365,7 +2220,7 @@ void database_table_commit_transaction (GError** error) {
if (_tmp2_ != 0) {
#line 395 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 2369 "DatabaseTable.c"
+#line 2224 "DatabaseTable.c"
}
#line 397 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_tmp3_ = database_table_db;
@@ -2377,7 +2232,7 @@ void database_table_commit_transaction (GError** error) {
_tmp5_ = res;
#line 398 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (_tmp5_ != SQLITE_DONE) {
-#line 2381 "DatabaseTable.c"
+#line 2236 "DatabaseTable.c"
gint _tmp6_;
#line 399 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_tmp6_ = res;
@@ -2391,7 +2246,7 @@ void database_table_commit_transaction (GError** error) {
g_propagate_error (error, _inner_error_);
#line 399 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 2395 "DatabaseTable.c"
+#line 2250 "DatabaseTable.c"
} else {
#line 399 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
@@ -2399,121 +2254,148 @@ void database_table_commit_transaction (GError** error) {
g_clear_error (&_inner_error_);
#line 399 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return;
-#line 2403 "DatabaseTable.c"
+#line 2258 "DatabaseTable.c"
}
}
}
}
-DatabaseTable* database_table_construct (GType object_type) {
+DatabaseTable*
+database_table_construct (GType object_type)
+{
DatabaseTable* self = NULL;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
self = (DatabaseTable*) g_type_create_instance (object_type);
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return self;
-#line 2416 "DatabaseTable.c"
+#line 2273 "DatabaseTable.c"
}
-static void value_database_table_init (GValue* value) {
+static void
+value_database_table_init (GValue* value)
+{
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
value->data[0].v_pointer = NULL;
-#line 2423 "DatabaseTable.c"
+#line 2282 "DatabaseTable.c"
}
-static void value_database_table_free_value (GValue* value) {
+static void
+value_database_table_free_value (GValue* value)
+{
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (value->data[0].v_pointer) {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
database_table_unref (value->data[0].v_pointer);
-#line 2432 "DatabaseTable.c"
+#line 2293 "DatabaseTable.c"
}
}
-static void value_database_table_copy_value (const GValue* src_value, GValue* dest_value) {
+static void
+value_database_table_copy_value (const GValue* src_value,
+ GValue* dest_value)
+{
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (src_value->data[0].v_pointer) {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
dest_value->data[0].v_pointer = database_table_ref (src_value->data[0].v_pointer);
-#line 2442 "DatabaseTable.c"
+#line 2306 "DatabaseTable.c"
} else {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
dest_value->data[0].v_pointer = NULL;
-#line 2446 "DatabaseTable.c"
+#line 2310 "DatabaseTable.c"
}
}
-static gpointer value_database_table_peek_pointer (const GValue* value) {
+static gpointer
+value_database_table_peek_pointer (const GValue* value)
+{
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return value->data[0].v_pointer;
-#line 2454 "DatabaseTable.c"
+#line 2320 "DatabaseTable.c"
}
-static gchar* value_database_table_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_database_table_collect_value (GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (collect_values[0].v_pointer) {
-#line 2461 "DatabaseTable.c"
+#line 2332 "DatabaseTable.c"
DatabaseTable * object;
object = collect_values[0].v_pointer;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (object->parent_instance.g_class == NULL) {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 2468 "DatabaseTable.c"
+#line 2339 "DatabaseTable.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 2472 "DatabaseTable.c"
+#line 2343 "DatabaseTable.c"
}
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
value->data[0].v_pointer = database_table_ref (object);
-#line 2476 "DatabaseTable.c"
+#line 2347 "DatabaseTable.c"
} else {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
value->data[0].v_pointer = NULL;
-#line 2480 "DatabaseTable.c"
+#line 2351 "DatabaseTable.c"
}
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return NULL;
-#line 2484 "DatabaseTable.c"
+#line 2355 "DatabaseTable.c"
}
-static gchar* value_database_table_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+static gchar*
+value_database_table_lcopy_value (const GValue* value,
+ guint n_collect_values,
+ GTypeCValue* collect_values,
+ guint collect_flags)
+{
DatabaseTable ** object_p;
object_p = collect_values[0].v_pointer;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (!object_p) {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 2495 "DatabaseTable.c"
+#line 2371 "DatabaseTable.c"
}
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (!value->data[0].v_pointer) {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
*object_p = NULL;
-#line 2501 "DatabaseTable.c"
+#line 2377 "DatabaseTable.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
*object_p = value->data[0].v_pointer;
-#line 2505 "DatabaseTable.c"
+#line 2381 "DatabaseTable.c"
} else {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
*object_p = database_table_ref (value->data[0].v_pointer);
-#line 2509 "DatabaseTable.c"
+#line 2385 "DatabaseTable.c"
}
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return NULL;
-#line 2513 "DatabaseTable.c"
+#line 2389 "DatabaseTable.c"
}
-GParamSpec* param_spec_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+GParamSpec*
+param_spec_database_table (const gchar* name,
+ const gchar* nick,
+ const gchar* blurb,
+ GType object_type,
+ GParamFlags flags)
+{
ParamSpecDatabaseTable* spec;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_DATABASE_TABLE), NULL);
@@ -2523,20 +2405,25 @@ GParamSpec* param_spec_database_table (const gchar* name, const gchar* nick, con
G_PARAM_SPEC (spec)->value_type = object_type;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return G_PARAM_SPEC (spec);
-#line 2527 "DatabaseTable.c"
+#line 2409 "DatabaseTable.c"
}
-gpointer value_get_database_table (const GValue* value) {
+gpointer
+value_get_database_table (const GValue* value)
+{
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DATABASE_TABLE), NULL);
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return value->data[0].v_pointer;
-#line 2536 "DatabaseTable.c"
+#line 2420 "DatabaseTable.c"
}
-void value_set_database_table (GValue* value, gpointer v_object) {
+void
+value_set_database_table (GValue* value,
+ gpointer v_object)
+{
DatabaseTable * old;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DATABASE_TABLE));
@@ -2552,22 +2439,25 @@ void value_set_database_table (GValue* value, gpointer v_object) {
value->data[0].v_pointer = v_object;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
database_table_ref (value->data[0].v_pointer);
-#line 2556 "DatabaseTable.c"
+#line 2443 "DatabaseTable.c"
} else {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
value->data[0].v_pointer = NULL;
-#line 2560 "DatabaseTable.c"
+#line 2447 "DatabaseTable.c"
}
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (old) {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
database_table_unref (old);
-#line 2566 "DatabaseTable.c"
+#line 2453 "DatabaseTable.c"
}
}
-void value_take_database_table (GValue* value, gpointer v_object) {
+void
+value_take_database_table (GValue* value,
+ gpointer v_object)
+{
DatabaseTable * old;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DATABASE_TABLE));
@@ -2581,40 +2471,46 @@ void value_take_database_table (GValue* value, gpointer v_object) {
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
value->data[0].v_pointer = v_object;
-#line 2585 "DatabaseTable.c"
+#line 2475 "DatabaseTable.c"
} else {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
value->data[0].v_pointer = NULL;
-#line 2589 "DatabaseTable.c"
+#line 2479 "DatabaseTable.c"
}
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
if (old) {
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
database_table_unref (old);
-#line 2595 "DatabaseTable.c"
+#line 2485 "DatabaseTable.c"
}
}
-static void database_table_class_init (DatabaseTableClass * klass) {
+static void
+database_table_class_init (DatabaseTableClass * klass)
+{
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
database_table_parent_class = g_type_class_peek_parent (klass);
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
((DatabaseTableClass *) klass)->finalize = database_table_finalize;
-#line 2605 "DatabaseTable.c"
+#line 2497 "DatabaseTable.c"
}
-static void database_table_instance_init (DatabaseTable * self) {
+static void
+database_table_instance_init (DatabaseTable * self)
+{
#line 30 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
self->table_name = NULL;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
self->ref_count = 1;
-#line 2614 "DatabaseTable.c"
+#line 2508 "DatabaseTable.c"
}
-static void database_table_finalize (DatabaseTable * obj) {
+static void
+database_table_finalize (DatabaseTable * obj)
+{
DatabaseTable * self;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_DATABASE_TABLE, DatabaseTable);
@@ -2622,11 +2518,13 @@ static void database_table_finalize (DatabaseTable * obj) {
g_signal_handlers_destroy (self);
#line 30 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
_g_free0 (self->table_name);
-#line 2626 "DatabaseTable.c"
+#line 2522 "DatabaseTable.c"
}
-GType database_table_get_type (void) {
+GType
+database_table_get_type (void)
+{
static volatile gsize database_table_type_id__volatile = 0;
if (g_once_init_enter (&database_table_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_database_table_init, value_database_table_free_value, value_database_table_copy_value, value_database_table_peek_pointer, "p", value_database_table_collect_value, "p", value_database_table_lcopy_value };
@@ -2640,18 +2538,22 @@ GType database_table_get_type (void) {
}
-gpointer database_table_ref (gpointer instance) {
+gpointer
+database_table_ref (gpointer instance)
+{
DatabaseTable * self;
self = instance;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_atomic_int_inc (&self->ref_count);
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
return instance;
-#line 2651 "DatabaseTable.c"
+#line 2551 "DatabaseTable.c"
}
-void database_table_unref (gpointer instance) {
+void
+database_table_unref (gpointer instance)
+{
DatabaseTable * self;
self = instance;
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
@@ -2660,7 +2562,7 @@ void database_table_unref (gpointer instance) {
DATABASE_TABLE_GET_CLASS (self)->finalize (self);
#line 16 "/home/jens/Source/shotwell/src/db/DatabaseTable.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 2664 "DatabaseTable.c"
+#line 2566 "DatabaseTable.c"
}
}