/* FSpotTagsTable.c generated by valac 0.32.1, the Vala compiler
 * generated from FSpotTagsTable.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <sqlite3.h>
#include <gee.h>


#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW (data_imports_fspot_db_fspot_tag_row_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRow))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRowClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRowClass))

typedef struct _DataImportsFSpotDbFSpotTagRow DataImportsFSpotDbFSpotTagRow;
typedef struct _DataImportsFSpotDbFSpotTagRowClass DataImportsFSpotDbFSpotTagRowClass;
typedef struct _DataImportsFSpotDbFSpotTagRowPrivate DataImportsFSpotDbFSpotTagRowPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ())
#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable))
#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass))
#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE))
#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE))
#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass))

typedef struct _ImportableDatabaseTable ImportableDatabaseTable;
typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass;
typedef struct _ImportableDatabaseTablePrivate ImportableDatabaseTablePrivate;

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE (data_imports_fspot_db_fspot_database_table_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass))

typedef struct _DataImportsFSpotDbFSpotDatabaseTable DataImportsFSpotDbFSpotDatabaseTable;
typedef struct _DataImportsFSpotDbFSpotDatabaseTableClass DataImportsFSpotDbFSpotDatabaseTableClass;
typedef struct _DataImportsFSpotDbFSpotDatabaseTablePrivate DataImportsFSpotDbFSpotDatabaseTablePrivate;

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR (data_imports_fspot_db_fspot_table_behavior_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehavior))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TABLE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TABLE_BEHAVIOR_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, DataImportsFSpotDbFSpotTableBehaviorIface))

typedef struct _DataImportsFSpotDbFSpotTableBehavior DataImportsFSpotDbFSpotTableBehavior;
typedef struct _DataImportsFSpotDbFSpotTableBehaviorIface DataImportsFSpotDbFSpotTableBehaviorIface;

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE (data_imports_fspot_db_fspot_tags_table_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTable))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTableClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTableClass))

typedef struct _DataImportsFSpotDbFSpotTagsTable DataImportsFSpotDbFSpotTagsTable;
typedef struct _DataImportsFSpotDbFSpotTagsTableClass DataImportsFSpotDbFSpotTagsTableClass;
typedef struct _DataImportsFSpotDbFSpotTagsTablePrivate DataImportsFSpotDbFSpotTagsTablePrivate;

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW (data_imports_fspot_db_fspot_photo_tag_row_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRow))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRowClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAG_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_TAG_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_TAG_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_TAG_ROW, DataImportsFSpotDbFSpotPhotoTagRowClass))

typedef struct _DataImportsFSpotDbFSpotPhotoTagRow DataImportsFSpotDbFSpotPhotoTagRow;
typedef struct _DataImportsFSpotDbFSpotPhotoTagRowClass DataImportsFSpotDbFSpotPhotoTagRowClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR (data_imports_fspot_db_fspot_database_behavior_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehavior))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass))

typedef struct _DataImportsFSpotDbFSpotDatabaseBehavior DataImportsFSpotDbFSpotDatabaseBehavior;
typedef struct _DataImportsFSpotDbFSpotDatabaseBehaviorClass DataImportsFSpotDbFSpotDatabaseBehaviorClass;
#define _sqlite3_finalize0(var) ((var == NULL) ? NULL : (var = (sqlite3_finalize (var), NULL)))

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR (data_imports_fspot_db_fspot_tags_v0_behavior_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0Behavior))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0BehaviorClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_V0_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_V0_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_V0_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0BehaviorClass))

typedef struct _DataImportsFSpotDbFSpotTagsV0Behavior DataImportsFSpotDbFSpotTagsV0Behavior;
typedef struct _DataImportsFSpotDbFSpotTagsV0BehaviorClass DataImportsFSpotDbFSpotTagsV0BehaviorClass;
typedef struct _DataImportsFSpotDbFSpotTagsV0BehaviorPrivate DataImportsFSpotDbFSpotTagsV0BehaviorPrivate;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _DataImportsFSpotDbFSpotTagRow {
	GObject parent_instance;
	DataImportsFSpotDbFSpotTagRowPrivate * priv;
	gint64 tag_id;
	gchar* name;
	gint64 category_id;
	gboolean is_category;
	gint sort_priority;
	gchar* stock_icon;
};

struct _DataImportsFSpotDbFSpotTagRowClass {
	GObjectClass parent_class;
};

struct _ImportableDatabaseTable {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ImportableDatabaseTablePrivate * priv;
	gchar* table_name;
};

struct _ImportableDatabaseTableClass {
	GTypeClass parent_class;
	void (*finalize) (ImportableDatabaseTable *self);
};

struct _DataImportsFSpotDbFSpotTableBehaviorIface {
	GTypeInterface parent_iface;
	gchar* (*get_table_name) (DataImportsFSpotDbFSpotTableBehavior* self);
	gchar** (*list_columns) (DataImportsFSpotDbFSpotTableBehavior* self, int* result_length1);
	void (*build_row) (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset);
};

struct _DataImportsFSpotDbFSpotDatabaseTable {
	ImportableDatabaseTable parent_instance;
	DataImportsFSpotDbFSpotDatabaseTablePrivate * priv;
	sqlite3* fspot_db;
	DataImportsFSpotDbFSpotTableBehavior* behavior;
};

struct _DataImportsFSpotDbFSpotDatabaseTableClass {
	ImportableDatabaseTableClass parent_class;
};

struct _DataImportsFSpotDbFSpotTagsTable {
	DataImportsFSpotDbFSpotDatabaseTable parent_instance;
	DataImportsFSpotDbFSpotTagsTablePrivate * priv;
};

struct _DataImportsFSpotDbFSpotTagsTableClass {
	DataImportsFSpotDbFSpotDatabaseTableClass parent_class;
};

struct _DataImportsFSpotDbFSpotTagsTablePrivate {
	DataImportsFSpotDbFSpotTableBehavior* photo_tags_behavior;
};

typedef enum  {
	DATABASE_ERROR_ERROR,
	DATABASE_ERROR_BACKING,
	DATABASE_ERROR_MEMORY,
	DATABASE_ERROR_ABORT,
	DATABASE_ERROR_LIMITS,
	DATABASE_ERROR_TYPESPEC
} DatabaseError;
#define DATABASE_ERROR database_error_quark ()
struct _DataImportsFSpotDbFSpotTagsV0Behavior {
	GObject parent_instance;
	DataImportsFSpotDbFSpotTagsV0BehaviorPrivate * priv;
};

struct _DataImportsFSpotDbFSpotTagsV0BehaviorClass {
	GObjectClass parent_class;
};


static gpointer data_imports_fspot_db_fspot_tag_row_parent_class = NULL;
static gpointer data_imports_fspot_db_fspot_tags_table_parent_class = NULL;
static gpointer data_imports_fspot_db_fspot_tags_v0_behavior_parent_class = NULL;
static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_instance;
static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_instance = NULL;
static DataImportsFSpotDbFSpotTableBehaviorIface* data_imports_fspot_db_fspot_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = NULL;

GType data_imports_fspot_db_fspot_tag_row_get_type (void) G_GNUC_CONST;
enum  {
	DATA_IMPORTS_FSPOT_DB_FSPOT_TAG_ROW_DUMMY_PROPERTY
};
DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tag_row_new (void);
DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tag_row_construct (GType object_type);
static void data_imports_fspot_db_fspot_tag_row_finalize (GObject* obj);
gpointer importable_database_table_ref (gpointer instance);
void importable_database_table_unref (gpointer instance);
GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_importable_database_table (GValue* value, gpointer v_object);
void value_take_importable_database_table (GValue* value, gpointer v_object);
gpointer value_get_importable_database_table (const GValue* value);
GType importable_database_table_get_type (void) G_GNUC_CONST;
GType data_imports_fspot_db_fspot_database_table_get_type (void) G_GNUC_CONST;
GType data_imports_fspot_db_fspot_table_behavior_get_type (void) G_GNUC_CONST;
GType data_imports_fspot_db_fspot_tags_table_get_type (void) G_GNUC_CONST;
GType data_imports_fspot_db_fspot_photo_tag_row_get_type (void) G_GNUC_CONST;
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTablePrivate))
enum  {
	DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_DUMMY_PROPERTY
};
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_TABLE_NAME "Tags"
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_PREFIX_STOCK_ICON "stock_icon:"
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_FAV "stock_icon:emblem-favorite"
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_PEOPLE "stock_icon:emblem-people"
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_PLACES "stock_icon:emblem-places"
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_STOCK_ICON_EVENTS "stock_icon:emblem-event"
GType data_imports_fspot_db_fspot_database_behavior_get_type (void) G_GNUC_CONST;
DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior);
DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior);
DataImportsFSpotDbFSpotDatabaseTable* data_imports_fspot_db_fspot_database_table_construct (GType object_type, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, sqlite3* db);
void data_imports_fspot_db_fspot_database_table_set_behavior (DataImportsFSpotDbFSpotDatabaseTable* self, DataImportsFSpotDbFSpotTableBehavior* behavior);
DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_tags_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self);
DataImportsFSpotDbFSpotTableBehavior* data_imports_fspot_db_fspot_database_behavior_get_photo_tags_behavior (DataImportsFSpotDbFSpotDatabaseBehavior* self);
GQuark database_error_quark (void);
DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tags_table_get_by_id (DataImportsFSpotDbFSpotTagsTable* self, gint64 tag_id, GError** error);
gchar* data_imports_fspot_db_fspot_database_table_get_joined_column_list (DataImportsFSpotDbFSpotDatabaseTable* self, gboolean with_table);
void importable_database_table_throw_error (const gchar* method, gint res, GError** error);
void data_imports_fspot_db_fspot_table_behavior_build_row (DataImportsFSpotDbFSpotTableBehavior* self, sqlite3_stmt* stmt, gpointer* row, gint offset);
GeeArrayList* data_imports_fspot_db_fspot_tags_table_get_by_photo_id (DataImportsFSpotDbFSpotTagsTable* self, gint64 photo_id, GError** error);
gchar* data_imports_fspot_db_fspot_table_behavior_get_table_name (DataImportsFSpotDbFSpotTableBehavior* self);
static void data_imports_fspot_db_fspot_tags_table_finalize (ImportableDatabaseTable* obj);
GType data_imports_fspot_db_fspot_tags_v0_behavior_get_type (void) G_GNUC_CONST;
enum  {
	DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_V0_BEHAVIOR_DUMMY_PROPERTY
};
static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_new (void);
static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_construct (GType object_type);
DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_get_instance (void);
static gchar* data_imports_fspot_db_fspot_tags_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base);
static gchar** data_imports_fspot_db_fspot_tags_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1);
static void data_imports_fspot_db_fspot_tags_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotTagRow** row, gint offset);
static void data_imports_fspot_db_fspot_tags_v0_behavior_finalize (GObject* obj);


DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tag_row_construct (GType object_type) {
	DataImportsFSpotDbFSpotTagRow * self = NULL;
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	self = (DataImportsFSpotDbFSpotTagRow*) g_object_new (object_type, NULL);
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return self;
#line 255 "FSpotTagsTable.c"
}


DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tag_row_new (void) {
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return data_imports_fspot_db_fspot_tag_row_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW);
#line 262 "FSpotTagsTable.c"
}


static void data_imports_fspot_db_fspot_tag_row_class_init (DataImportsFSpotDbFSpotTagRowClass * klass) {
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	data_imports_fspot_db_fspot_tag_row_parent_class = g_type_class_peek_parent (klass);
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_tag_row_finalize;
#line 271 "FSpotTagsTable.c"
}


static void data_imports_fspot_db_fspot_tag_row_instance_init (DataImportsFSpotDbFSpotTagRow * self) {
}


static void data_imports_fspot_db_fspot_tag_row_finalize (GObject* obj) {
	DataImportsFSpotDbFSpotTagRow * self;
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, DataImportsFSpotDbFSpotTagRow);
#line 14 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_free0 (self->name);
#line 18 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_free0 (self->stock_icon);
#line 12 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	G_OBJECT_CLASS (data_imports_fspot_db_fspot_tag_row_parent_class)->finalize (obj);
#line 289 "FSpotTagsTable.c"
}


/**
 * The value object for the "tags" table, representing a single database row.
 */
GType data_imports_fspot_db_fspot_tag_row_get_type (void) {
	static volatile gsize data_imports_fspot_db_fspot_tag_row_type_id__volatile = 0;
	if (g_once_init_enter (&data_imports_fspot_db_fspot_tag_row_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotTagRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_tag_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotTagRow), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_tag_row_instance_init, NULL };
		GType data_imports_fspot_db_fspot_tag_row_type_id;
		data_imports_fspot_db_fspot_tag_row_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotTagRow", &g_define_type_info, 0);
		g_once_init_leave (&data_imports_fspot_db_fspot_tag_row_type_id__volatile, data_imports_fspot_db_fspot_tag_row_type_id);
	}
	return data_imports_fspot_db_fspot_tag_row_type_id__volatile;
}


DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) {
	DataImportsFSpotDbFSpotTagsTable* self = NULL;
	sqlite3* _tmp0_ = NULL;
	DataImportsFSpotDbFSpotDatabaseBehavior* _tmp1_ = NULL;
	DataImportsFSpotDbFSpotTableBehavior* _tmp2_ = NULL;
	DataImportsFSpotDbFSpotTableBehavior* _tmp3_ = NULL;
	DataImportsFSpotDbFSpotDatabaseBehavior* _tmp4_ = NULL;
	DataImportsFSpotDbFSpotTableBehavior* _tmp5_ = NULL;
#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	g_return_val_if_fail (db != NULL, NULL);
#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR (db_behavior), NULL);
#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp0_ = db;
#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	self = (DataImportsFSpotDbFSpotTagsTable*) data_imports_fspot_db_fspot_database_table_construct (object_type, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp0_);
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp1_ = db_behavior;
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp2_ = data_imports_fspot_db_fspot_database_behavior_get_tags_behavior (_tmp1_);
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp3_ = _tmp2_;
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	data_imports_fspot_db_fspot_database_table_set_behavior (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), _tmp3_);
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_object_unref0 (_tmp3_);
#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp4_ = db_behavior;
#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp5_ = data_imports_fspot_db_fspot_database_behavior_get_photo_tags_behavior (_tmp4_);
#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_object_unref0 (self->priv->photo_tags_behavior);
#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	self->priv->photo_tags_behavior = _tmp5_;
#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return self;
#line 344 "FSpotTagsTable.c"
}


DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior) {
#line 35 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return data_imports_fspot_db_fspot_tags_table_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, db, db_behavior);
#line 351 "FSpotTagsTable.c"
}


DataImportsFSpotDbFSpotTagRow* data_imports_fspot_db_fspot_tags_table_get_by_id (DataImportsFSpotDbFSpotTagsTable* self, gint64 tag_id, GError** error) {
	DataImportsFSpotDbFSpotTagRow* result = NULL;
	sqlite3_stmt* stmt = NULL;
	DataImportsFSpotDbFSpotTagRow* row = NULL;
	gchar* column_list = NULL;
	gchar* _tmp0_ = NULL;
	gchar* sql = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gint res = 0;
	sqlite3* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	sqlite3_stmt* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	sqlite3_stmt* _tmp13_ = NULL;
	gint64 _tmp14_ = 0LL;
	gint _tmp15_ = 0;
	gint _tmp16_ = 0;
	sqlite3_stmt* _tmp17_ = NULL;
	gint _tmp18_ = 0;
	gint _tmp19_ = 0;
	GError * _inner_error_ = NULL;
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE (self), NULL);
#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	row = NULL;
#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp0_ = data_imports_fspot_db_fspot_database_table_get_joined_column_list (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), FALSE);
#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	column_list = _tmp0_;
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp1_ = column_list;
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)->table_name;
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp3_ = g_strdup_printf ("SELECT %s FROM %s WHERE id=?", _tmp1_, _tmp2_);
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	sql = _tmp3_;
#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->fspot_db;
#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp5_ = sql;
#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp7_ = sqlite3_prepare_v2 (_tmp4_, _tmp5_, -1, &_tmp6_, NULL);
#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_sqlite3_finalize0 (stmt);
#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	stmt = _tmp6_;
#line 47 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	res = _tmp7_;
#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp8_ = res;
#line 48 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	if (_tmp8_ != SQLITE_OK) {
#line 411 "FSpotTagsTable.c"
		const gchar* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		gint _tmp12_ = 0;
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp9_ = sql;
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp10_ = g_strdup_printf ("Statement failed: %s", _tmp9_);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp11_ = _tmp10_;
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp12_ = res;
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		importable_database_table_throw_error (_tmp11_, _tmp12_, &_inner_error_);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_g_free0 (_tmp11_);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
			if (_inner_error_->domain == DATABASE_ERROR) {
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				g_propagate_error (error, _inner_error_);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (sql);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (column_list);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_object_unref0 (row);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_sqlite3_finalize0 (stmt);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				return NULL;
#line 444 "FSpotTagsTable.c"
			} else {
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (sql);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (column_list);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_object_unref0 (row);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_sqlite3_finalize0 (stmt);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.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);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				g_clear_error (&_inner_error_);
#line 49 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				return NULL;
#line 460 "FSpotTagsTable.c"
			}
		}
	}
#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp13_ = stmt;
#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp14_ = tag_id;
#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp15_ = sqlite3_bind_int64 (_tmp13_, 1, _tmp14_);
#line 51 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	res = _tmp15_;
#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp16_ = res;
#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_vala_assert (_tmp16_ == SQLITE_OK, "res == Sqlite.OK");
#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp17_ = stmt;
#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp18_ = sqlite3_step (_tmp17_);
#line 54 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	res = _tmp18_;
#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp19_ = res;
#line 55 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	if (_tmp19_ == SQLITE_ROW) {
#line 486 "FSpotTagsTable.c"
		DataImportsFSpotDbFSpotTableBehavior* _tmp20_ = NULL;
		sqlite3_stmt* _tmp21_ = NULL;
		gpointer _tmp22_ = NULL;
#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp20_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->behavior;
#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp21_ = stmt;
#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		data_imports_fspot_db_fspot_table_behavior_build_row (_tmp20_, _tmp21_, &_tmp22_, 0);
#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_g_object_unref0 (row);
#line 56 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		row = _tmp22_;
#line 500 "FSpotTagsTable.c"
	} else {
		gint _tmp23_ = 0;
#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp23_ = res;
#line 57 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		if (_tmp23_ == SQLITE_DONE) {
#line 507 "FSpotTagsTable.c"
			gint64 _tmp24_ = 0LL;
#line 58 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
			_tmp24_ = tag_id;
#line 58 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
			g_message ("FSpotTagsTable.vala:58: Could not find tag row with ID %d", (gint) _tmp24_);
#line 513 "FSpotTagsTable.c"
		}
	}
#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	result = row;
#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_free0 (sql);
#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_free0 (column_list);
#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_sqlite3_finalize0 (stmt);
#line 60 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return result;
#line 526 "FSpotTagsTable.c"
}


GeeArrayList* data_imports_fspot_db_fspot_tags_table_get_by_photo_id (DataImportsFSpotDbFSpotTagsTable* self, gint64 photo_id, GError** error) {
	GeeArrayList* result = NULL;
	GeeArrayList* rows = NULL;
	GeeArrayList* _tmp0_ = NULL;
	sqlite3_stmt* stmt = NULL;
	gchar* column_list = NULL;
	gchar* _tmp1_ = NULL;
	gchar* sql = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	DataImportsFSpotDbFSpotTableBehavior* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gint res = 0;
	sqlite3* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	sqlite3_stmt* _tmp11_ = NULL;
	gint _tmp12_ = 0;
	gint _tmp13_ = 0;
	sqlite3_stmt* _tmp18_ = NULL;
	gint64 _tmp19_ = 0LL;
	gint _tmp20_ = 0;
	gint _tmp21_ = 0;
	sqlite3_stmt* _tmp23_ = NULL;
	gint _tmp24_ = 0;
	GError * _inner_error_ = NULL;
#line 63 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE (self), NULL);
#line 64 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp0_ = gee_array_list_new (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAG_ROW, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 64 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	rows = _tmp0_;
#line 68 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp1_ = data_imports_fspot_db_fspot_database_table_get_joined_column_list (G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable), TRUE);
#line 68 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	column_list = _tmp1_;
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp2_ = column_list;
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp3_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable)->table_name;
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp4_ = self->priv->photo_tags_behavior;
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp5_ = data_imports_fspot_db_fspot_table_behavior_get_table_name (_tmp4_);
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp6_ = _tmp5_;
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp7_ = g_strdup_printf ("SELECT %1$s FROM %2$s, %3$s WHERE %3$s.photo_id=? AND %3$s.tag_id = %2" \
"$s.id", _tmp2_, _tmp3_, _tmp6_);
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp8_ = _tmp7_;
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_free0 (_tmp6_);
#line 69 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	sql = _tmp8_;
#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp9_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->fspot_db;
#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp10_ = sql;
#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp12_ = sqlite3_prepare_v2 (_tmp9_, _tmp10_, -1, &_tmp11_, NULL);
#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_sqlite3_finalize0 (stmt);
#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	stmt = _tmp11_;
#line 73 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	res = _tmp12_;
#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp13_ = res;
#line 74 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	if (_tmp13_ != SQLITE_OK) {
#line 602 "FSpotTagsTable.c"
		const gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		gint _tmp17_ = 0;
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp14_ = sql;
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp15_ = g_strdup_printf ("Statement failed: %s", _tmp14_);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp16_ = _tmp15_;
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp17_ = res;
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		importable_database_table_throw_error (_tmp16_, _tmp17_, &_inner_error_);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_g_free0 (_tmp16_);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
			if (_inner_error_->domain == DATABASE_ERROR) {
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				g_propagate_error (error, _inner_error_);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (sql);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (column_list);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_sqlite3_finalize0 (stmt);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_object_unref0 (rows);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				return NULL;
#line 635 "FSpotTagsTable.c"
			} else {
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (sql);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (column_list);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_sqlite3_finalize0 (stmt);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_object_unref0 (rows);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.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);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				g_clear_error (&_inner_error_);
#line 75 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				return NULL;
#line 651 "FSpotTagsTable.c"
			}
		}
	}
#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp18_ = stmt;
#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp19_ = photo_id;
#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp20_ = sqlite3_bind_int64 (_tmp18_, 1, _tmp19_);
#line 77 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	res = _tmp20_;
#line 78 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp21_ = res;
#line 78 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	if (_tmp21_ != SQLITE_OK) {
#line 667 "FSpotTagsTable.c"
		gint _tmp22_ = 0;
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp22_ = res;
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		importable_database_table_throw_error ("Bind failed for photo_id", _tmp22_, &_inner_error_);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
			if (_inner_error_->domain == DATABASE_ERROR) {
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				g_propagate_error (error, _inner_error_);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (sql);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (column_list);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_sqlite3_finalize0 (stmt);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_object_unref0 (rows);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				return NULL;
#line 689 "FSpotTagsTable.c"
			} else {
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (sql);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_free0 (column_list);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_sqlite3_finalize0 (stmt);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				_g_object_unref0 (rows);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.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);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				g_clear_error (&_inner_error_);
#line 79 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
				return NULL;
#line 705 "FSpotTagsTable.c"
			}
		}
	}
#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp23_ = stmt;
#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp24_ = sqlite3_step (_tmp23_);
#line 81 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	res = _tmp24_;
#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	while (TRUE) {
#line 717 "FSpotTagsTable.c"
		gint _tmp25_ = 0;
		DataImportsFSpotDbFSpotTagRow* row = NULL;
		DataImportsFSpotDbFSpotTableBehavior* _tmp26_ = NULL;
		sqlite3_stmt* _tmp27_ = NULL;
		gpointer _tmp28_ = NULL;
		GeeArrayList* _tmp29_ = NULL;
		DataImportsFSpotDbFSpotTagRow* _tmp30_ = NULL;
		sqlite3_stmt* _tmp31_ = NULL;
		gint _tmp32_ = 0;
#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp25_ = res;
#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		if (!(_tmp25_ == SQLITE_ROW)) {
#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
			break;
#line 733 "FSpotTagsTable.c"
		}
#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp26_ = G_TYPE_CHECK_INSTANCE_CAST (self, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable)->behavior;
#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp27_ = stmt;
#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		data_imports_fspot_db_fspot_table_behavior_build_row (_tmp26_, _tmp27_, &_tmp28_, 0);
#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_g_object_unref0 (row);
#line 84 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		row = _tmp28_;
#line 85 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp29_ = rows;
#line 85 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp30_ = row;
#line 85 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp30_);
#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp31_ = stmt;
#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp32_ = sqlite3_step (_tmp31_);
#line 86 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		res = _tmp32_;
#line 82 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_g_object_unref0 (row);
#line 759 "FSpotTagsTable.c"
	}
#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	result = rows;
#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_free0 (sql);
#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_free0 (column_list);
#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_sqlite3_finalize0 (stmt);
#line 89 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return result;
#line 771 "FSpotTagsTable.c"
}


static void data_imports_fspot_db_fspot_tags_table_class_init (DataImportsFSpotDbFSpotTagsTableClass * klass) {
#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	data_imports_fspot_db_fspot_tags_table_parent_class = g_type_class_peek_parent (klass);
#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	((ImportableDatabaseTableClass *) klass)->finalize = data_imports_fspot_db_fspot_tags_table_finalize;
#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	g_type_class_add_private (klass, sizeof (DataImportsFSpotDbFSpotTagsTablePrivate));
#line 782 "FSpotTagsTable.c"
}


static void data_imports_fspot_db_fspot_tags_table_instance_init (DataImportsFSpotDbFSpotTagsTable * self) {
#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	self->priv = DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_GET_PRIVATE (self);
#line 789 "FSpotTagsTable.c"
}


static void data_imports_fspot_db_fspot_tags_table_finalize (ImportableDatabaseTable* obj) {
	DataImportsFSpotDbFSpotTagsTable * self;
#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTable);
#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_object_unref0 (self->priv->photo_tags_behavior);
#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	IMPORTABLE_DATABASE_TABLE_CLASS (data_imports_fspot_db_fspot_tags_table_parent_class)->finalize (obj);
#line 801 "FSpotTagsTable.c"
}


/**
 * This class represents the F-Spot tags table.
 */
GType data_imports_fspot_db_fspot_tags_table_get_type (void) {
	static volatile gsize data_imports_fspot_db_fspot_tags_table_type_id__volatile = 0;
	if (g_once_init_enter (&data_imports_fspot_db_fspot_tags_table_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotTagsTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_tags_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotTagsTable), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_tags_table_instance_init, NULL };
		GType data_imports_fspot_db_fspot_tags_table_type_id;
		data_imports_fspot_db_fspot_tags_table_type_id = g_type_register_static (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, "DataImportsFSpotDbFSpotTagsTable", &g_define_type_info, 0);
		g_once_init_leave (&data_imports_fspot_db_fspot_tags_table_type_id__volatile, data_imports_fspot_db_fspot_tags_table_type_id);
	}
	return data_imports_fspot_db_fspot_tags_table_type_id__volatile;
}


static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_construct (GType object_type) {
	DataImportsFSpotDbFSpotTagsV0Behavior * self = NULL;
#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	self = (DataImportsFSpotDbFSpotTagsV0Behavior*) g_object_new (object_type, NULL);
#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return self;
#line 826 "FSpotTagsTable.c"
}


static DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_new (void) {
#line 96 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return data_imports_fspot_db_fspot_tags_v0_behavior_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR);
#line 833 "FSpotTagsTable.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return self ? g_object_ref (self) : NULL;
#line 840 "FSpotTagsTable.c"
}


DataImportsFSpotDbFSpotTagsV0Behavior* data_imports_fspot_db_fspot_tags_v0_behavior_get_instance (void) {
	DataImportsFSpotDbFSpotTagsV0Behavior* result = NULL;
	DataImportsFSpotDbFSpotTagsV0Behavior* _tmp0_ = NULL;
	DataImportsFSpotDbFSpotTagsV0Behavior* _tmp2_ = NULL;
	DataImportsFSpotDbFSpotTagsV0Behavior* _tmp3_ = NULL;
#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp0_ = data_imports_fspot_db_fspot_tags_v0_behavior_instance;
#line 100 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	if (_tmp0_ == NULL) {
#line 853 "FSpotTagsTable.c"
		DataImportsFSpotDbFSpotTagsV0Behavior* _tmp1_ = NULL;
#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp1_ = data_imports_fspot_db_fspot_tags_v0_behavior_new ();
#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_g_object_unref0 (data_imports_fspot_db_fspot_tags_v0_behavior_instance);
#line 101 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		data_imports_fspot_db_fspot_tags_v0_behavior_instance = _tmp1_;
#line 861 "FSpotTagsTable.c"
	}
#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp2_ = data_imports_fspot_db_fspot_tags_v0_behavior_instance;
#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	result = _tmp3_;
#line 102 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return result;
#line 871 "FSpotTagsTable.c"
}


static gchar* data_imports_fspot_db_fspot_tags_v0_behavior_real_get_table_name (DataImportsFSpotDbFSpotTableBehavior* base) {
	DataImportsFSpotDbFSpotTagsV0Behavior * self;
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
#line 105 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0Behavior);
#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp0_ = g_strdup (DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_TABLE_NAME);
#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	result = _tmp0_;
#line 106 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return result;
#line 887 "FSpotTagsTable.c"
}


static gchar** data_imports_fspot_db_fspot_tags_v0_behavior_real_list_columns (DataImportsFSpotDbFSpotTableBehavior* base, int* result_length1) {
	DataImportsFSpotDbFSpotTagsV0Behavior * self;
	gchar** result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar** _tmp6_ = NULL;
	gchar** _tmp7_ = NULL;
	gint _tmp7__length1 = 0;
#line 109 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0Behavior);
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp0_ = g_strdup ("id");
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp1_ = g_strdup ("name");
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp2_ = g_strdup ("category_id");
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp3_ = g_strdup ("is_category");
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp4_ = g_strdup ("sort_priority");
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp5_ = g_strdup ("icon");
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp6_ = g_new0 (gchar*, 6 + 1);
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp6_[0] = _tmp0_;
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp6_[1] = _tmp1_;
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp6_[2] = _tmp2_;
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp6_[3] = _tmp3_;
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp6_[4] = _tmp4_;
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp6_[5] = _tmp5_;
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp7_ = _tmp6_;
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp7__length1 = 6;
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	if (result_length1) {
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		*result_length1 = _tmp7__length1;
#line 939 "FSpotTagsTable.c"
	}
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	result = _tmp7_;
#line 110 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	return result;
#line 945 "FSpotTagsTable.c"
}


static void data_imports_fspot_db_fspot_tags_v0_behavior_real_build_row (DataImportsFSpotDbFSpotTableBehavior* base, sqlite3_stmt* stmt, DataImportsFSpotDbFSpotTagRow** row, gint offset) {
	DataImportsFSpotDbFSpotTagsV0Behavior * self;
	DataImportsFSpotDbFSpotTagRow* _vala_row = NULL;
	DataImportsFSpotDbFSpotTagRow* _tmp0_ = NULL;
	DataImportsFSpotDbFSpotTagRow* _tmp1_ = NULL;
	sqlite3_stmt* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint64 _tmp4_ = 0LL;
	DataImportsFSpotDbFSpotTagRow* _tmp5_ = NULL;
	sqlite3_stmt* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	const gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	DataImportsFSpotDbFSpotTagRow* _tmp10_ = NULL;
	sqlite3_stmt* _tmp11_ = NULL;
	gint _tmp12_ = 0;
	gint64 _tmp13_ = 0LL;
	DataImportsFSpotDbFSpotTagRow* _tmp14_ = NULL;
	sqlite3_stmt* _tmp15_ = NULL;
	gint _tmp16_ = 0;
	gint _tmp17_ = 0;
	DataImportsFSpotDbFSpotTagRow* _tmp18_ = NULL;
	sqlite3_stmt* _tmp19_ = NULL;
	gint _tmp20_ = 0;
	gint _tmp21_ = 0;
	gchar* icon_str = NULL;
	sqlite3_stmt* _tmp22_ = NULL;
	gint _tmp23_ = 0;
	const gchar* _tmp24_ = NULL;
	gchar* _tmp25_ = NULL;
	gboolean _tmp26_ = FALSE;
	const gchar* _tmp27_ = NULL;
#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0Behavior);
#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	g_return_if_fail (stmt != NULL);
#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp0_ = data_imports_fspot_db_fspot_tag_row_new ();
#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_object_unref0 (_vala_row);
#line 114 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_vala_row = _tmp0_;
#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp1_ = _vala_row;
#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp2_ = stmt;
#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp3_ = offset;
#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp4_ = sqlite3_column_int64 (_tmp2_, _tmp3_ + 0);
#line 115 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp1_->tag_id = _tmp4_;
#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp5_ = _vala_row;
#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp6_ = stmt;
#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp7_ = offset;
#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp8_ = sqlite3_column_text (_tmp6_, _tmp7_ + 1);
#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp9_ = g_strdup (_tmp8_);
#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_free0 (_tmp5_->name);
#line 116 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp5_->name = _tmp9_;
#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp10_ = _vala_row;
#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp11_ = stmt;
#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp12_ = offset;
#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp13_ = sqlite3_column_int64 (_tmp11_, _tmp12_ + 2);
#line 117 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp10_->category_id = _tmp13_;
#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp14_ = _vala_row;
#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp15_ = stmt;
#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp16_ = offset;
#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp17_ = sqlite3_column_int (_tmp15_, _tmp16_ + 3);
#line 118 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp14_->is_category = _tmp17_ > 0;
#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp18_ = _vala_row;
#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp19_ = stmt;
#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp20_ = offset;
#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp21_ = sqlite3_column_int (_tmp19_, _tmp20_ + 4);
#line 119 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp18_->sort_priority = _tmp21_;
#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp22_ = stmt;
#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp23_ = offset;
#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp24_ = sqlite3_column_text (_tmp22_, _tmp23_ + 5);
#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp25_ = g_strdup (_tmp24_);
#line 120 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	icon_str = _tmp25_;
#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_tmp27_ = icon_str;
#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	if (_tmp27_ != NULL) {
#line 1059 "FSpotTagsTable.c"
		const gchar* _tmp28_ = NULL;
		gboolean _tmp29_ = FALSE;
#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp28_ = icon_str;
#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp29_ = g_str_has_prefix (_tmp28_, DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_PREFIX_STOCK_ICON);
#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp26_ = _tmp29_;
#line 1068 "FSpotTagsTable.c"
	} else {
#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp26_ = FALSE;
#line 1072 "FSpotTagsTable.c"
	}
#line 121 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	if (_tmp26_) {
#line 1076 "FSpotTagsTable.c"
		DataImportsFSpotDbFSpotTagRow* _tmp30_ = NULL;
		const gchar* _tmp31_ = NULL;
		gchar* _tmp32_ = NULL;
#line 122 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp30_ = _vala_row;
#line 122 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp31_ = icon_str;
#line 122 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp32_ = g_strdup (_tmp31_);
#line 122 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_g_free0 (_tmp30_->stock_icon);
#line 122 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp30_->stock_icon = _tmp32_;
#line 1090 "FSpotTagsTable.c"
	} else {
		DataImportsFSpotDbFSpotTagRow* _tmp33_ = NULL;
		gchar* _tmp34_ = NULL;
#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp33_ = _vala_row;
#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp34_ = g_strdup ("");
#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_g_free0 (_tmp33_->stock_icon);
#line 124 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_tmp33_->stock_icon = _tmp34_;
#line 1102 "FSpotTagsTable.c"
	}
#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	_g_free0 (icon_str);
#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	if (row) {
#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		*row = _vala_row;
#line 1110 "FSpotTagsTable.c"
	} else {
#line 113 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
		_g_object_unref0 (_vala_row);
#line 1114 "FSpotTagsTable.c"
	}
}


static void data_imports_fspot_db_fspot_tags_v0_behavior_class_init (DataImportsFSpotDbFSpotTagsV0BehaviorClass * klass) {
#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	data_imports_fspot_db_fspot_tags_v0_behavior_parent_class = g_type_class_peek_parent (klass);
#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_tags_v0_behavior_finalize;
#line 1124 "FSpotTagsTable.c"
}


static void data_imports_fspot_db_fspot_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init (DataImportsFSpotDbFSpotTableBehaviorIface * iface) {
#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	data_imports_fspot_db_fspot_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_parent_iface = g_type_interface_peek_parent (iface);
#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	iface->get_table_name = (gchar* (*)(DataImportsFSpotDbFSpotTableBehavior*)) data_imports_fspot_db_fspot_tags_v0_behavior_real_get_table_name;
#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	iface->list_columns = (gchar** (*)(DataImportsFSpotDbFSpotTableBehavior*, int*)) data_imports_fspot_db_fspot_tags_v0_behavior_real_list_columns;
#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	iface->build_row = (void (*)(DataImportsFSpotDbFSpotTableBehavior*, sqlite3_stmt*, gpointer*, gint)) data_imports_fspot_db_fspot_tags_v0_behavior_real_build_row;
#line 1137 "FSpotTagsTable.c"
}


static void data_imports_fspot_db_fspot_tags_v0_behavior_instance_init (DataImportsFSpotDbFSpotTagsV0Behavior * self) {
}


static void data_imports_fspot_db_fspot_tags_v0_behavior_finalize (GObject* obj) {
	DataImportsFSpotDbFSpotTagsV0Behavior * self;
#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_V0_BEHAVIOR, DataImportsFSpotDbFSpotTagsV0Behavior);
#line 93 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotTagsTable.vala"
	G_OBJECT_CLASS (data_imports_fspot_db_fspot_tags_v0_behavior_parent_class)->finalize (obj);
#line 1151 "FSpotTagsTable.c"
}


GType data_imports_fspot_db_fspot_tags_v0_behavior_get_type (void) {
	static volatile gsize data_imports_fspot_db_fspot_tags_v0_behavior_type_id__volatile = 0;
	if (g_once_init_enter (&data_imports_fspot_db_fspot_tags_v0_behavior_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotTagsV0BehaviorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_tags_v0_behavior_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotTagsV0Behavior), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_tags_v0_behavior_instance_init, NULL };
		static const GInterfaceInfo data_imports_fspot_db_fspot_table_behavior_info = { (GInterfaceInitFunc) data_imports_fspot_db_fspot_tags_v0_behavior_data_imports_fspot_db_fspot_table_behavior_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType data_imports_fspot_db_fspot_tags_v0_behavior_type_id;
		data_imports_fspot_db_fspot_tags_v0_behavior_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotTagsV0Behavior", &g_define_type_info, 0);
		g_type_add_interface_static (data_imports_fspot_db_fspot_tags_v0_behavior_type_id, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TABLE_BEHAVIOR, &data_imports_fspot_db_fspot_table_behavior_info);
		g_once_init_leave (&data_imports_fspot_db_fspot_tags_v0_behavior_type_id__volatile, data_imports_fspot_db_fspot_tags_v0_behavior_type_id);
	}
	return data_imports_fspot_db_fspot_tags_v0_behavior_type_id__volatile;
}



