/* sqlheavy-enums.c generated by valac 0.16.0, the Vala compiler
 * generated from sqlheavy-enums.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include "SQLHeavy.h"
#include <stdlib.h>
#include <string.h>

#define _g_free0(var) (var = (g_free (var), NULL))





const gchar* sql_heavy_transaction_type_to_string (SQLHeavyTransactionType self) {
	const gchar* result = NULL;
	switch (self) {
		case SQL_HEAVY_TRANSACTION_TYPE_DEFERRED:
		{
			result = "DEFERRED";
			return result;
		}
		case SQL_HEAVY_TRANSACTION_TYPE_IMMEDIATE:
		{
			result = "IMMEDIATE";
			return result;
		}
		case SQL_HEAVY_TRANSACTION_TYPE_EXCLUSIVE:
		{
			result = "EXCLUSIVE";
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}


/**
   * Transaction type.
   *
   * See SQLite documentation at [[http://sqlite.org/lang_transaction.html]]
   *
   * @see SQLHeavy.Transaction
   */
GType sql_heavy_transaction_type_get_type (void) {
	static volatile gsize sql_heavy_transaction_type_type_id__volatile = 0;
	if (g_once_init_enter (&sql_heavy_transaction_type_type_id__volatile)) {
		static const GEnumValue values[] = {{SQL_HEAVY_TRANSACTION_TYPE_DEFERRED, "SQL_HEAVY_TRANSACTION_TYPE_DEFERRED", "deferred"}, {SQL_HEAVY_TRANSACTION_TYPE_IMMEDIATE, "SQL_HEAVY_TRANSACTION_TYPE_IMMEDIATE", "immediate"}, {SQL_HEAVY_TRANSACTION_TYPE_EXCLUSIVE, "SQL_HEAVY_TRANSACTION_TYPE_EXCLUSIVE", "exclusive"}, {0, NULL, NULL}};
		GType sql_heavy_transaction_type_type_id;
		sql_heavy_transaction_type_type_id = g_enum_register_static ("SQLHeavyTransactionType", values);
		g_once_init_leave (&sql_heavy_transaction_type_type_id__volatile, sql_heavy_transaction_type_type_id);
	}
	return sql_heavy_transaction_type_type_id__volatile;
}


/**
   * Mode to use when opening the database.
   */
GType sql_heavy_file_mode_get_type (void) {
	static volatile gsize sql_heavy_file_mode_type_id__volatile = 0;
	if (g_once_init_enter (&sql_heavy_file_mode_type_id__volatile)) {
		static const GFlagsValue values[] = {{SQL_HEAVY_FILE_MODE_READ, "SQL_HEAVY_FILE_MODE_READ", "read"}, {SQL_HEAVY_FILE_MODE_WRITE, "SQL_HEAVY_FILE_MODE_WRITE", "write"}, {SQL_HEAVY_FILE_MODE_CREATE, "SQL_HEAVY_FILE_MODE_CREATE", "create"}, {0, NULL, NULL}};
		GType sql_heavy_file_mode_type_id;
		sql_heavy_file_mode_type_id = g_flags_register_static ("SQLHeavyFileMode", values);
		g_once_init_leave (&sql_heavy_file_mode_type_id__volatile, sql_heavy_file_mode_type_id);
	}
	return sql_heavy_file_mode_type_id__volatile;
}


/**
   * Auto-vacuum mode
   *
   * See SQLite documentation at [[http://sqlite.org/pragma.html#pragma_auto_vacuum]]
   *
   * @see Database.auto_vacuum
   * @see Database.free_list_count
   * @see Database.incremental_vacuum
   */
GType sql_heavy_auto_vacuum_get_type (void) {
	static volatile gsize sql_heavy_auto_vacuum_type_id__volatile = 0;
	if (g_once_init_enter (&sql_heavy_auto_vacuum_type_id__volatile)) {
		static const GEnumValue values[] = {{SQL_HEAVY_AUTO_VACUUM_NONE, "SQL_HEAVY_AUTO_VACUUM_NONE", "none"}, {SQL_HEAVY_AUTO_VACUUM_FULL, "SQL_HEAVY_AUTO_VACUUM_FULL", "full"}, {SQL_HEAVY_AUTO_VACUUM_INCREMENTAL, "SQL_HEAVY_AUTO_VACUUM_INCREMENTAL", "incremental"}, {0, NULL, NULL}};
		GType sql_heavy_auto_vacuum_type_id;
		sql_heavy_auto_vacuum_type_id = g_enum_register_static ("SQLHeavyAutoVacuum", values);
		g_once_init_leave (&sql_heavy_auto_vacuum_type_id__volatile, sql_heavy_auto_vacuum_type_id);
	}
	return sql_heavy_auto_vacuum_type_id__volatile;
}


/**
     * Convert a string value to an Encoding
     *
     * @param encoding encoding
     */
SQLHeavyEncoding sql_heavy_encoding_from_string (const gchar* encoding) {
	SQLHeavyEncoding result = 0;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* enc;
	const gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
	gboolean _tmp6_;
	const gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp27_;
	_tmp0_ = encoding;
	_tmp1_ = g_utf8_strup (_tmp0_, (gssize) (-1));
	enc = _tmp1_;
	_tmp2_ = enc;
	_tmp3_ = sql_heavy_encoding_to_string (SQL_HEAVY_ENCODING_UTF_8);
	_tmp4_ = g_utf8_strup (_tmp3_, (gssize) (-1));
	_tmp5_ = _tmp4_;
	_tmp6_ = g_strcmp0 (_tmp2_, _tmp5_) == 0;
	_g_free0 (_tmp5_);
	if (_tmp6_) {
		result = SQL_HEAVY_ENCODING_UTF_8;
		_g_free0 (enc);
		return result;
	} else {
		const gchar* _tmp7_;
		const gchar* _tmp8_ = NULL;
		gchar* _tmp9_ = NULL;
		gchar* _tmp10_;
		gboolean _tmp11_;
		_tmp7_ = enc;
		_tmp8_ = sql_heavy_encoding_to_string (SQL_HEAVY_ENCODING_UTF_16);
		_tmp9_ = g_utf8_strup (_tmp8_, (gssize) (-1));
		_tmp10_ = _tmp9_;
		_tmp11_ = g_strcmp0 (_tmp7_, _tmp10_) == 0;
		_g_free0 (_tmp10_);
		if (_tmp11_) {
			result = SQL_HEAVY_ENCODING_UTF_16;
			_g_free0 (enc);
			return result;
		} else {
			const gchar* _tmp12_;
			const gchar* _tmp13_ = NULL;
			gchar* _tmp14_ = NULL;
			gchar* _tmp15_;
			gboolean _tmp16_;
			_tmp12_ = enc;
			_tmp13_ = sql_heavy_encoding_to_string (SQL_HEAVY_ENCODING_UTF_16LE);
			_tmp14_ = g_utf8_strup (_tmp13_, (gssize) (-1));
			_tmp15_ = _tmp14_;
			_tmp16_ = g_strcmp0 (_tmp12_, _tmp15_) == 0;
			_g_free0 (_tmp15_);
			if (_tmp16_) {
				result = SQL_HEAVY_ENCODING_UTF_16LE;
				_g_free0 (enc);
				return result;
			} else {
				const gchar* _tmp17_;
				const gchar* _tmp18_ = NULL;
				gchar* _tmp19_ = NULL;
				gchar* _tmp20_;
				gboolean _tmp21_;
				_tmp17_ = enc;
				_tmp18_ = sql_heavy_encoding_to_string (SQL_HEAVY_ENCODING_UTF_16BE);
				_tmp19_ = g_utf8_strup (_tmp18_, (gssize) (-1));
				_tmp20_ = _tmp19_;
				_tmp21_ = g_strcmp0 (_tmp17_, _tmp20_) == 0;
				_g_free0 (_tmp20_);
				if (_tmp21_) {
					result = SQL_HEAVY_ENCODING_UTF_16BE;
					_g_free0 (enc);
					return result;
				}
			}
		}
	}
	_tmp22_ = encoding;
	_tmp23_ = g_strdup (_tmp22_);
	_tmp24_ = _tmp23_;
	_tmp25_ = _tmp24_;
	if (_tmp25_ == NULL) {
		gchar* _tmp26_;
		_tmp26_ = g_strdup ("null");
		_g_free0 (_tmp24_);
		_tmp24_ = _tmp26_;
	}
	_tmp27_ = _tmp24_;
	g_critical ("sqlheavy-enums.vala:130: Invalid encoding (%s).", (const gchar*) _tmp27_);
	result = SQL_HEAVY_ENCODING_UTF_8;
	_g_free0 (_tmp24_);
	_g_free0 (enc);
	return result;
}


const gchar* sql_heavy_encoding_to_string (SQLHeavyEncoding self) {
	const gchar* result = NULL;
	switch (self) {
		case SQL_HEAVY_ENCODING_UTF_8:
		{
			result = "UTF-8";
			return result;
		}
		case SQL_HEAVY_ENCODING_UTF_16:
		{
			result = "UTF-16";
			return result;
		}
		case SQL_HEAVY_ENCODING_UTF_16LE:
		{
			result = "UTF-16le";
			return result;
		}
		case SQL_HEAVY_ENCODING_UTF_16BE:
		{
			result = "UTF-16be";
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}


/**
   * Data encoding
   *
   * SQLHeavy applications should generally use UTF-8, since strings
   * are assumed to be UTF-8 encoded.
   *
   * See SQLite documentation at [[http://sqlite.org/pragma.html#pragma_encoding]]
   *
   * @see Database.encoding
   */
GType sql_heavy_encoding_get_type (void) {
	static volatile gsize sql_heavy_encoding_type_id__volatile = 0;
	if (g_once_init_enter (&sql_heavy_encoding_type_id__volatile)) {
		static const GEnumValue values[] = {{SQL_HEAVY_ENCODING_UTF_8, "SQL_HEAVY_ENCODING_UTF_8", "utf-8"}, {SQL_HEAVY_ENCODING_UTF_16, "SQL_HEAVY_ENCODING_UTF_16", "utf-16"}, {SQL_HEAVY_ENCODING_UTF_16LE, "SQL_HEAVY_ENCODING_UTF_16LE", "utf-16le"}, {SQL_HEAVY_ENCODING_UTF_16BE, "SQL_HEAVY_ENCODING_UTF_16BE", "utf-16be"}, {0, NULL, NULL}};
		GType sql_heavy_encoding_type_id;
		sql_heavy_encoding_type_id = g_enum_register_static ("SQLHeavyEncoding", values);
		g_once_init_leave (&sql_heavy_encoding_type_id__volatile, sql_heavy_encoding_type_id);
	}
	return sql_heavy_encoding_type_id__volatile;
}


/**
     * Convert a string as returned by SQLite to a JournalMode
     *
     * @param journal_mode the string representation of the journal mode
     * @return the JournalMode
     */
SQLHeavyJournalMode sql_heavy_journal_mode_from_string (const gchar* journal_mode) {
	SQLHeavyJournalMode result = 0;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* mode;
	const gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	_tmp0_ = journal_mode;
	_tmp1_ = g_utf8_strup (_tmp0_, (gssize) (-1));
	mode = _tmp1_;
	_tmp2_ = mode;
	_tmp3_ = sql_heavy_journal_mode_to_string (SQL_HEAVY_JOURNAL_MODE_DELETE);
	if (g_strcmp0 (_tmp2_, _tmp3_) == 0) {
		result = SQL_HEAVY_JOURNAL_MODE_DELETE;
		_g_free0 (mode);
		return result;
	} else {
		const gchar* _tmp4_;
		const gchar* _tmp5_ = NULL;
		_tmp4_ = mode;
		_tmp5_ = sql_heavy_journal_mode_to_string (SQL_HEAVY_JOURNAL_MODE_TRUNCATE);
		if (g_strcmp0 (_tmp4_, _tmp5_) == 0) {
			result = SQL_HEAVY_JOURNAL_MODE_TRUNCATE;
			_g_free0 (mode);
			return result;
		} else {
			const gchar* _tmp6_;
			const gchar* _tmp7_ = NULL;
			_tmp6_ = mode;
			_tmp7_ = sql_heavy_journal_mode_to_string (SQL_HEAVY_JOURNAL_MODE_PERSIST);
			if (g_strcmp0 (_tmp6_, _tmp7_) == 0) {
				result = SQL_HEAVY_JOURNAL_MODE_PERSIST;
				_g_free0 (mode);
				return result;
			} else {
				const gchar* _tmp8_;
				const gchar* _tmp9_ = NULL;
				_tmp8_ = mode;
				_tmp9_ = sql_heavy_journal_mode_to_string (SQL_HEAVY_JOURNAL_MODE_MEMORY);
				if (g_strcmp0 (_tmp8_, _tmp9_) == 0) {
					result = SQL_HEAVY_JOURNAL_MODE_MEMORY;
					_g_free0 (mode);
					return result;
				} else {
					const gchar* _tmp10_;
					const gchar* _tmp11_ = NULL;
					_tmp10_ = mode;
					_tmp11_ = sql_heavy_journal_mode_to_string (SQL_HEAVY_JOURNAL_MODE_OFF);
					if (g_strcmp0 (_tmp10_, _tmp11_) == 0) {
						result = SQL_HEAVY_JOURNAL_MODE_OFF;
						_g_free0 (mode);
						return result;
					} else {
						const gchar* _tmp12_;
						const gchar* _tmp13_ = NULL;
						_tmp12_ = mode;
						_tmp13_ = sql_heavy_journal_mode_to_string (SQL_HEAVY_JOURNAL_MODE_WAL);
						if (g_strcmp0 (_tmp12_, _tmp13_) == 0) {
							result = SQL_HEAVY_JOURNAL_MODE_WAL;
							_g_free0 (mode);
							return result;
						} else {
							result = SQL_HEAVY_JOURNAL_MODE_DELETE;
							_g_free0 (mode);
							return result;
						}
					}
				}
			}
		}
	}
	_g_free0 (mode);
}


/**
     * Get the string representation of the journal mode as expected
     * by SQLite
     *
     * @return string representatio of the journal mode
     */
const gchar* sql_heavy_journal_mode_to_string (SQLHeavyJournalMode self) {
	const gchar* result = NULL;
	switch (self) {
		case SQL_HEAVY_JOURNAL_MODE_DELETE:
		{
			result = "DELETE";
			return result;
		}
		case SQL_HEAVY_JOURNAL_MODE_TRUNCATE:
		{
			result = "TRUNCATE";
			return result;
		}
		case SQL_HEAVY_JOURNAL_MODE_PERSIST:
		{
			result = "PERSIST";
			return result;
		}
		case SQL_HEAVY_JOURNAL_MODE_MEMORY:
		{
			result = "MEMORY";
			return result;
		}
		case SQL_HEAVY_JOURNAL_MODE_WAL:
		{
			result = "WAL";
			return result;
		}
		case SQL_HEAVY_JOURNAL_MODE_OFF:
		{
			result = "OFF";
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}


/**
   * Journal mode
   *
   * See SQLite documentation at [[http://sqlite.org/pragma.html#pragma_journal_mode]]
   *
   * @see Database.journal_mode
   */
GType sql_heavy_journal_mode_get_type (void) {
	static volatile gsize sql_heavy_journal_mode_type_id__volatile = 0;
	if (g_once_init_enter (&sql_heavy_journal_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{SQL_HEAVY_JOURNAL_MODE_DELETE, "SQL_HEAVY_JOURNAL_MODE_DELETE", "delete"}, {SQL_HEAVY_JOURNAL_MODE_TRUNCATE, "SQL_HEAVY_JOURNAL_MODE_TRUNCATE", "truncate"}, {SQL_HEAVY_JOURNAL_MODE_PERSIST, "SQL_HEAVY_JOURNAL_MODE_PERSIST", "persist"}, {SQL_HEAVY_JOURNAL_MODE_MEMORY, "SQL_HEAVY_JOURNAL_MODE_MEMORY", "memory"}, {SQL_HEAVY_JOURNAL_MODE_WAL, "SQL_HEAVY_JOURNAL_MODE_WAL", "wal"}, {SQL_HEAVY_JOURNAL_MODE_OFF, "SQL_HEAVY_JOURNAL_MODE_OFF", "off"}, {0, NULL, NULL}};
		GType sql_heavy_journal_mode_type_id;
		sql_heavy_journal_mode_type_id = g_enum_register_static ("SQLHeavyJournalMode", values);
		g_once_init_leave (&sql_heavy_journal_mode_type_id__volatile, sql_heavy_journal_mode_type_id);
	}
	return sql_heavy_journal_mode_type_id__volatile;
}


/**
     * Get a locking mode from its string representation
     *
     * @param locking_mode the string representation of the locking mode
     * @return the locking mode
     */
SQLHeavyLockingMode sql_heavy_locking_mode_from_string (const gchar* locking_mode) {
	SQLHeavyLockingMode result = 0;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* mode;
	const gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	_tmp0_ = locking_mode;
	_tmp1_ = g_utf8_strup (_tmp0_, (gssize) (-1));
	mode = _tmp1_;
	_tmp2_ = mode;
	_tmp3_ = sql_heavy_locking_mode_to_string (SQL_HEAVY_LOCKING_MODE_NORMAL);
	if (g_strcmp0 (_tmp2_, _tmp3_) == 0) {
		result = SQL_HEAVY_LOCKING_MODE_NORMAL;
		_g_free0 (mode);
		return result;
	} else {
		const gchar* _tmp4_;
		const gchar* _tmp5_ = NULL;
		_tmp4_ = mode;
		_tmp5_ = sql_heavy_locking_mode_to_string (SQL_HEAVY_LOCKING_MODE_EXCLUSIVE);
		if (g_strcmp0 (_tmp4_, _tmp5_) == 0) {
			result = SQL_HEAVY_LOCKING_MODE_EXCLUSIVE;
			_g_free0 (mode);
			return result;
		} else {
			result = SQL_HEAVY_LOCKING_MODE_NORMAL;
			_g_free0 (mode);
			return result;
		}
	}
	_g_free0 (mode);
}


/**
     * Convert a locking mode to its string representation
     *
     * @return the string representation of the locking mode
     */
const gchar* sql_heavy_locking_mode_to_string (SQLHeavyLockingMode self) {
	const gchar* result = NULL;
	switch (self) {
		case SQL_HEAVY_LOCKING_MODE_NORMAL:
		{
			result = "NORMAL";
			return result;
		}
		case SQL_HEAVY_LOCKING_MODE_EXCLUSIVE:
		{
			result = "EXCLUSIVE";
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}


/**
   * Database locking mode
   *
   * See SQLite documentation at: [[http://sqlite.org/pragma.html#pragma_locking_mode]]
   *
   * @see Database.locking_mode
   */
GType sql_heavy_locking_mode_get_type (void) {
	static volatile gsize sql_heavy_locking_mode_type_id__volatile = 0;
	if (g_once_init_enter (&sql_heavy_locking_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{SQL_HEAVY_LOCKING_MODE_NORMAL, "SQL_HEAVY_LOCKING_MODE_NORMAL", "normal"}, {SQL_HEAVY_LOCKING_MODE_EXCLUSIVE, "SQL_HEAVY_LOCKING_MODE_EXCLUSIVE", "exclusive"}, {0, NULL, NULL}};
		GType sql_heavy_locking_mode_type_id;
		sql_heavy_locking_mode_type_id = g_enum_register_static ("SQLHeavyLockingMode", values);
		g_once_init_leave (&sql_heavy_locking_mode_type_id__volatile, sql_heavy_locking_mode_type_id);
	}
	return sql_heavy_locking_mode_type_id__volatile;
}


/**
     * Get a synchronous mode from its string representation
     *
     * @param synchronous_mode the string representation of the synchronous mode
     * @return the synchronous mode
     */
SQLHeavySynchronousMode sql_heavy_synchronous_mode_from_string (const gchar* synchronous_mode) {
	SQLHeavySynchronousMode result = 0;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* mode;
	const gchar* _tmp2_;
	const gchar* _tmp3_ = NULL;
	_tmp0_ = synchronous_mode;
	_tmp1_ = g_utf8_strup (_tmp0_, (gssize) (-1));
	mode = _tmp1_;
	_tmp2_ = mode;
	_tmp3_ = sql_heavy_synchronous_mode_to_string (SQL_HEAVY_SYNCHRONOUS_MODE_OFF);
	if (g_strcmp0 (_tmp2_, _tmp3_) == 0) {
		result = SQL_HEAVY_SYNCHRONOUS_MODE_OFF;
		_g_free0 (mode);
		return result;
	} else {
		const gchar* _tmp4_;
		const gchar* _tmp5_ = NULL;
		_tmp4_ = mode;
		_tmp5_ = sql_heavy_synchronous_mode_to_string (SQL_HEAVY_SYNCHRONOUS_MODE_NORMAL);
		if (g_strcmp0 (_tmp4_, _tmp5_) == 0) {
			result = SQL_HEAVY_SYNCHRONOUS_MODE_NORMAL;
			_g_free0 (mode);
			return result;
		} else {
			const gchar* _tmp6_;
			const gchar* _tmp7_ = NULL;
			_tmp6_ = mode;
			_tmp7_ = sql_heavy_synchronous_mode_to_string (SQL_HEAVY_SYNCHRONOUS_MODE_FULL);
			if (g_strcmp0 (_tmp6_, _tmp7_) == 0) {
				result = SQL_HEAVY_SYNCHRONOUS_MODE_FULL;
				_g_free0 (mode);
				return result;
			} else {
				result = SQL_HEAVY_SYNCHRONOUS_MODE_FULL;
				_g_free0 (mode);
				return result;
			}
		}
	}
	_g_free0 (mode);
}


/**
     * Return a string representation of the synchronous mode
     *
     * @return the string representation of the synchronous mode
     */
const gchar* sql_heavy_synchronous_mode_to_string (SQLHeavySynchronousMode self) {
	const gchar* result = NULL;
	switch (self) {
		case SQL_HEAVY_SYNCHRONOUS_MODE_OFF:
		{
			result = "OFF";
			return result;
		}
		case SQL_HEAVY_SYNCHRONOUS_MODE_NORMAL:
		{
			result = "NORMAL";
			return result;
		}
		case SQL_HEAVY_SYNCHRONOUS_MODE_FULL:
		{
			result = "FULL";
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}


/**
   * Synchronous Mode
   *
   * See SQLite documentation at: [[http://sqlite.org/pragma.html#pragma_synchronous]]
   *
   * @see Database.synchronous
   */
GType sql_heavy_synchronous_mode_get_type (void) {
	static volatile gsize sql_heavy_synchronous_mode_type_id__volatile = 0;
	if (g_once_init_enter (&sql_heavy_synchronous_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{SQL_HEAVY_SYNCHRONOUS_MODE_OFF, "SQL_HEAVY_SYNCHRONOUS_MODE_OFF", "off"}, {SQL_HEAVY_SYNCHRONOUS_MODE_NORMAL, "SQL_HEAVY_SYNCHRONOUS_MODE_NORMAL", "normal"}, {SQL_HEAVY_SYNCHRONOUS_MODE_FULL, "SQL_HEAVY_SYNCHRONOUS_MODE_FULL", "full"}, {0, NULL, NULL}};
		GType sql_heavy_synchronous_mode_type_id;
		sql_heavy_synchronous_mode_type_id = g_enum_register_static ("SQLHeavySynchronousMode", values);
		g_once_init_leave (&sql_heavy_synchronous_mode_type_id__volatile, sql_heavy_synchronous_mode_type_id);
	}
	return sql_heavy_synchronous_mode_type_id__volatile;
}


/**
     * Get a temporary storage mode from its string representation
     *
     * @param temp_store_mode the string representation
     * @return a temporary storage mode
     */
SQLHeavyTempStoreMode sql_heavy_temp_store_mode_from_string (const gchar* temp_store_mode) {
	SQLHeavyTempStoreMode result = 0;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* mode;
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp3_;
	const gchar* _tmp4_ = NULL;
	gboolean _tmp6_;
	_tmp0_ = temp_store_mode;
	_tmp1_ = g_utf8_strup (_tmp0_, (gssize) (-1));
	mode = _tmp1_;
	_tmp3_ = mode;
	_tmp4_ = sql_heavy_temp_store_mode_to_string (SQL_HEAVY_TEMP_STORE_MODE_DEFAULT);
	if (g_strcmp0 (_tmp3_, _tmp4_) == 0) {
		_tmp2_ = TRUE;
	} else {
		const gchar* _tmp5_;
		_tmp5_ = mode;
		_tmp2_ = g_strcmp0 (_tmp5_, "0") == 0;
	}
	_tmp6_ = _tmp2_;
	if (_tmp6_) {
		result = SQL_HEAVY_TEMP_STORE_MODE_DEFAULT;
		_g_free0 (mode);
		return result;
	} else {
		gboolean _tmp7_ = FALSE;
		const gchar* _tmp8_;
		const gchar* _tmp9_ = NULL;
		gboolean _tmp11_;
		_tmp8_ = mode;
		_tmp9_ = sql_heavy_temp_store_mode_to_string (SQL_HEAVY_TEMP_STORE_MODE_FILE);
		if (g_strcmp0 (_tmp8_, _tmp9_) == 0) {
			_tmp7_ = TRUE;
		} else {
			const gchar* _tmp10_;
			_tmp10_ = mode;
			_tmp7_ = g_strcmp0 (_tmp10_, "1") == 0;
		}
		_tmp11_ = _tmp7_;
		if (_tmp11_) {
			result = SQL_HEAVY_TEMP_STORE_MODE_FILE;
			_g_free0 (mode);
			return result;
		} else {
			gboolean _tmp12_ = FALSE;
			const gchar* _tmp13_;
			const gchar* _tmp14_ = NULL;
			gboolean _tmp16_;
			_tmp13_ = mode;
			_tmp14_ = sql_heavy_temp_store_mode_to_string (SQL_HEAVY_TEMP_STORE_MODE_MEMORY);
			if (g_strcmp0 (_tmp13_, _tmp14_) == 0) {
				_tmp12_ = TRUE;
			} else {
				const gchar* _tmp15_;
				_tmp15_ = mode;
				_tmp12_ = g_strcmp0 (_tmp15_, "2") == 0;
			}
			_tmp16_ = _tmp12_;
			if (_tmp16_) {
				result = SQL_HEAVY_TEMP_STORE_MODE_MEMORY;
				_g_free0 (mode);
				return result;
			} else {
				result = SQL_HEAVY_TEMP_STORE_MODE_DEFAULT;
				_g_free0 (mode);
				return result;
			}
		}
	}
	_g_free0 (mode);
}


/**
     * Convert a temporary storage mode to its string representation
     *
     * @return the string representation of the temporary storage mode
     */
const gchar* sql_heavy_temp_store_mode_to_string (SQLHeavyTempStoreMode self) {
	const gchar* result = NULL;
	switch (self) {
		case SQL_HEAVY_TEMP_STORE_MODE_DEFAULT:
		{
			result = "DEFAULT";
			return result;
		}
		case SQL_HEAVY_TEMP_STORE_MODE_FILE:
		{
			result = "FILE";
			return result;
		}
		case SQL_HEAVY_TEMP_STORE_MODE_MEMORY:
		{
			result = "MEMORY";
			return result;
		}
		default:
		{
			g_assert_not_reached ();
		}
	}
}


/**
   * Temporary store mode
   *
   * See SQLite documentation at: [[http://sqlite.org/pragma.html#pragma_temp_store]]
   *
   * @see Database.temp_store
   */
GType sql_heavy_temp_store_mode_get_type (void) {
	static volatile gsize sql_heavy_temp_store_mode_type_id__volatile = 0;
	if (g_once_init_enter (&sql_heavy_temp_store_mode_type_id__volatile)) {
		static const GEnumValue values[] = {{SQL_HEAVY_TEMP_STORE_MODE_DEFAULT, "SQL_HEAVY_TEMP_STORE_MODE_DEFAULT", "default"}, {SQL_HEAVY_TEMP_STORE_MODE_FILE, "SQL_HEAVY_TEMP_STORE_MODE_FILE", "file"}, {SQL_HEAVY_TEMP_STORE_MODE_MEMORY, "SQL_HEAVY_TEMP_STORE_MODE_MEMORY", "memory"}, {0, NULL, NULL}};
		GType sql_heavy_temp_store_mode_type_id;
		sql_heavy_temp_store_mode_type_id = g_enum_register_static ("SQLHeavyTempStoreMode", values);
		g_once_init_leave (&sql_heavy_temp_store_mode_type_id__volatile, sql_heavy_temp_store_mode_type_id);
	}
	return sql_heavy_temp_store_mode_type_id__volatile;
}


/**
   * Transaction Status
   *
   * @see Transaction.status
   */
GType sql_heavy_transaction_status_get_type (void) {
	static volatile gsize sql_heavy_transaction_status_type_id__volatile = 0;
	if (g_once_init_enter (&sql_heavy_transaction_status_type_id__volatile)) {
		static const GEnumValue values[] = {{SQL_HEAVY_TRANSACTION_STATUS_UNRESOLVED, "SQL_HEAVY_TRANSACTION_STATUS_UNRESOLVED", "unresolved"}, {SQL_HEAVY_TRANSACTION_STATUS_COMMITTED, "SQL_HEAVY_TRANSACTION_STATUS_COMMITTED", "committed"}, {SQL_HEAVY_TRANSACTION_STATUS_ROLLED_BACK, "SQL_HEAVY_TRANSACTION_STATUS_ROLLED_BACK", "rolled-back"}, {0, NULL, NULL}};
		GType sql_heavy_transaction_status_type_id;
		sql_heavy_transaction_status_type_id = g_enum_register_static ("SQLHeavyTransactionStatus", values);
		g_once_init_leave (&sql_heavy_transaction_status_type_id__volatile, sql_heavy_transaction_status_type_id);
	}
	return sql_heavy_transaction_status_type_id__volatile;
}


/**
   * Sort Order
   */
GType sql_heavy_sort_order_get_type (void) {
	static volatile gsize sql_heavy_sort_order_type_id__volatile = 0;
	if (g_once_init_enter (&sql_heavy_sort_order_type_id__volatile)) {
		static const GEnumValue values[] = {{SQL_HEAVY_SORT_ORDER_ASCENDING, "SQL_HEAVY_SORT_ORDER_ASCENDING", "ascending"}, {SQL_HEAVY_SORT_ORDER_DESCENDING, "SQL_HEAVY_SORT_ORDER_DESCENDING", "descending"}, {0, NULL, NULL}};
		GType sql_heavy_sort_order_type_id;
		sql_heavy_sort_order_type_id = g_enum_register_static ("SQLHeavySortOrder", values);
		g_once_init_leave (&sql_heavy_sort_order_type_id__volatile, sql_heavy_sort_order_type_id);
	}
	return sql_heavy_sort_order_type_id__volatile;
}



