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


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

#define _g_byte_array_unref0(var) ((var == NULL) ? NULL : (var = (g_byte_array_unref (var), NULL)))



static void sql_heavy_mutable_record_real_set (SQLHeavyMutableRecord* self, const gchar* field, GValue* value, GError** error);
static void sql_heavy_mutable_record_real_put_string (SQLHeavyMutableRecord* self, gint field, const gchar* value, GError** error);
static void sql_heavy_mutable_record_real_set_string (SQLHeavyMutableRecord* self, const gchar* field, const gchar* value, GError** error);
static void sql_heavy_mutable_record_real_put_null (SQLHeavyMutableRecord* self, gint field, GError** error);
static void sql_heavy_mutable_record_real_set_null (SQLHeavyMutableRecord* self, const gchar* field, GError** error);
static void sql_heavy_mutable_record_real_put_int (SQLHeavyMutableRecord* self, gint field, gint value, GError** error);
static void sql_heavy_mutable_record_real_set_int (SQLHeavyMutableRecord* self, const gchar* field, gint value, GError** error);
static void sql_heavy_mutable_record_real_put_int64 (SQLHeavyMutableRecord* self, gint field, gint64 value, GError** error);
static void sql_heavy_mutable_record_real_set_int64 (SQLHeavyMutableRecord* self, const gchar* field, gint64 value, GError** error);
static void sql_heavy_mutable_record_real_put_double (SQLHeavyMutableRecord* self, gint field, gdouble value, GError** error);
static void sql_heavy_mutable_record_real_set_double (SQLHeavyMutableRecord* self, const gchar* field, gdouble value, GError** error);
static void sql_heavy_mutable_record_real_put_blob (SQLHeavyMutableRecord* self, gint field, guint8* value, int value_length1, GError** error);
static void sql_heavy_mutable_record_real_set_blob (SQLHeavyMutableRecord* self, const gchar* field, guint8* value, int value_length1, GError** error);
static void sql_heavy_mutable_record_real_put_time_t (SQLHeavyMutableRecord* self, gint field, time_t value, GError** error);
static void sql_heavy_mutable_record_real_set_time_t (SQLHeavyMutableRecord* self, const gchar* field, time_t value, GError** error);


/**
     * Put a value into a field of a record
     *
     * @param field the index of the field
     * @param value the value of the field
     */
void sql_heavy_mutable_record_put (SQLHeavyMutableRecord* self, gint field, GValue* value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->put (self, field, value, error);
}


/**
     * Put a value into a named field of a record
     *
     * @param field the name of the field
     * @param value the value of the field
     */
static void sql_heavy_mutable_record_real_set (SQLHeavyMutableRecord* self, const gchar* field, GValue* value, GError** error) {
	const gchar* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_;
	GValue _tmp3_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (field != NULL);
	g_return_if_fail (value != NULL);
	_tmp0_ = field;
	_tmp1_ = sql_heavy_record_field_index ((SQLHeavyRecord*) self, _tmp0_, &_inner_error_);
	_tmp2_ = _tmp1_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_tmp3_ = *value;
	sql_heavy_mutable_record_put (self, _tmp2_, &_tmp3_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_set (SQLHeavyMutableRecord* self, const gchar* field, GValue* value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->set (self, field, value, error);
}


/**
     * Put a string value into a field of a record
     *
     * @param field index of the field to put data into
     * @param value value to put into the field
     * @see set_string
     */
static void sql_heavy_mutable_record_real_put_string (SQLHeavyMutableRecord* self, gint field, const gchar* value, GError** error) {
	const gchar* _tmp0_;
	GError * _inner_error_ = NULL;
	_tmp0_ = value;
	if (_tmp0_ == NULL) {
		gint _tmp1_;
		_tmp1_ = field;
		sql_heavy_mutable_record_put_null (self, _tmp1_, &_inner_error_);
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				g_propagate_error (error, _inner_error_);
				return;
			} else {
				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);
				g_clear_error (&_inner_error_);
				return;
			}
		}
	} else {
		gint _tmp2_;
		const gchar* _tmp3_;
		GValue _tmp4_ = {0};
		_tmp2_ = field;
		_tmp3_ = value;
		g_value_init (&_tmp4_, G_TYPE_STRING);
		g_value_set_string (&_tmp4_, (const gchar*) _tmp3_);
		sql_heavy_mutable_record_put (self, _tmp2_, &_tmp4_, &_inner_error_);
		G_IS_VALUE (&_tmp4_) ? (g_value_unset (&_tmp4_), NULL) : NULL;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == SQL_HEAVY_ERROR) {
				g_propagate_error (error, _inner_error_);
				return;
			} else {
				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);
				g_clear_error (&_inner_error_);
				return;
			}
		}
	}
}


void sql_heavy_mutable_record_put_string (SQLHeavyMutableRecord* self, gint field, const gchar* value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->put_string (self, field, value, error);
}


/**
     * Put a string value into a named field of a record
     *
     * @param field name of the field to put data into
     * @param value value to put into the field
     * @see put_string
     */
static void sql_heavy_mutable_record_real_set_string (SQLHeavyMutableRecord* self, const gchar* field, const gchar* value, GError** error) {
	const gchar* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_;
	const gchar* _tmp3_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (field != NULL);
	_tmp0_ = field;
	_tmp1_ = sql_heavy_record_field_index ((SQLHeavyRecord*) self, _tmp0_, &_inner_error_);
	_tmp2_ = _tmp1_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_tmp3_ = value;
	sql_heavy_mutable_record_put_string (self, _tmp2_, _tmp3_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_set_string (SQLHeavyMutableRecord* self, const gchar* field, const gchar* value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->set_string (self, field, value, error);
}


/**
     * Put a null value into a field of a record
     *
     * @param field index of the field to put data into
     * @see set_null
     */
static void sql_heavy_mutable_record_real_put_null (SQLHeavyMutableRecord* self, gint field, GError** error) {
	GValue _tmp0_ = {0};
	GValue gv;
	gint _tmp1_;
	GValue _tmp2_;
	GError * _inner_error_ = NULL;
	g_value_init (&_tmp0_, G_TYPE_POINTER);
	gv = _tmp0_;
	g_value_set_pointer (&gv, NULL);
	_tmp1_ = field;
	_tmp2_ = gv;
	sql_heavy_mutable_record_put (self, _tmp1_, &_tmp2_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			G_IS_VALUE (&gv) ? (g_value_unset (&gv), NULL) : NULL;
			return;
		} else {
			G_IS_VALUE (&gv) ? (g_value_unset (&gv), NULL) : NULL;
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	G_IS_VALUE (&gv) ? (g_value_unset (&gv), NULL) : NULL;
}


void sql_heavy_mutable_record_put_null (SQLHeavyMutableRecord* self, gint field, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->put_null (self, field, error);
}


/**
     * Put a null value into a named field of a record
     *
     * @param field index of the field to put data into
     * @see put_null
     */
static void sql_heavy_mutable_record_real_set_null (SQLHeavyMutableRecord* self, const gchar* field, GError** error) {
	const gchar* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (field != NULL);
	_tmp0_ = field;
	_tmp1_ = sql_heavy_record_field_index ((SQLHeavyRecord*) self, _tmp0_, &_inner_error_);
	_tmp2_ = _tmp1_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	sql_heavy_mutable_record_put_null (self, _tmp2_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_set_null (SQLHeavyMutableRecord* self, const gchar* field, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->set_null (self, field, error);
}


/**
     * Put an integer value into a field of a record
     *
     * @param field index of the field to put data into
     * @param value value to put into the field
     * @see set_int
     */
static void sql_heavy_mutable_record_real_put_int (SQLHeavyMutableRecord* self, gint field, gint value, GError** error) {
	gint _tmp0_;
	gint _tmp1_;
	GValue _tmp2_ = {0};
	GError * _inner_error_ = NULL;
	_tmp0_ = field;
	_tmp1_ = value;
	g_value_init (&_tmp2_, G_TYPE_INT);
	g_value_set_int (&_tmp2_, _tmp1_);
	sql_heavy_mutable_record_put (self, _tmp0_, &_tmp2_, &_inner_error_);
	G_IS_VALUE (&_tmp2_) ? (g_value_unset (&_tmp2_), NULL) : NULL;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_put_int (SQLHeavyMutableRecord* self, gint field, gint value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->put_int (self, field, value, error);
}


/**
     * Put an integer value into a named field of a record
     *
     * @param field name of the field to put data into
     * @param value value to put into the field
     * @see put_int
     */
static void sql_heavy_mutable_record_real_set_int (SQLHeavyMutableRecord* self, const gchar* field, gint value, GError** error) {
	const gchar* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_;
	gint _tmp3_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (field != NULL);
	_tmp0_ = field;
	_tmp1_ = sql_heavy_record_field_index ((SQLHeavyRecord*) self, _tmp0_, &_inner_error_);
	_tmp2_ = _tmp1_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_tmp3_ = value;
	sql_heavy_mutable_record_put_int (self, _tmp2_, _tmp3_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_set_int (SQLHeavyMutableRecord* self, const gchar* field, gint value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->set_int (self, field, value, error);
}


/**
     * Put a 64-bit integer value into a field of a record
     *
     * @param field index of the field to put data into
     * @param value value to put into the field
     * @see set_int64
     */
static void sql_heavy_mutable_record_real_put_int64 (SQLHeavyMutableRecord* self, gint field, gint64 value, GError** error) {
	gint _tmp0_;
	gint64 _tmp1_;
	GValue _tmp2_ = {0};
	GError * _inner_error_ = NULL;
	_tmp0_ = field;
	_tmp1_ = value;
	g_value_init (&_tmp2_, G_TYPE_INT64);
	g_value_set_int64 (&_tmp2_, _tmp1_);
	sql_heavy_mutable_record_put (self, _tmp0_, &_tmp2_, &_inner_error_);
	G_IS_VALUE (&_tmp2_) ? (g_value_unset (&_tmp2_), NULL) : NULL;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_put_int64 (SQLHeavyMutableRecord* self, gint field, gint64 value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->put_int64 (self, field, value, error);
}


/**
     * Put a 64-bit integer value into a named field of a record
     *
     * @param field name of the field to put data into
     * @param value value to put into the field
     * @see put_int64
     */
static void sql_heavy_mutable_record_real_set_int64 (SQLHeavyMutableRecord* self, const gchar* field, gint64 value, GError** error) {
	const gchar* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_;
	gint64 _tmp3_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (field != NULL);
	_tmp0_ = field;
	_tmp1_ = sql_heavy_record_field_index ((SQLHeavyRecord*) self, _tmp0_, &_inner_error_);
	_tmp2_ = _tmp1_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_tmp3_ = value;
	sql_heavy_mutable_record_put_int64 (self, _tmp2_, _tmp3_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_set_int64 (SQLHeavyMutableRecord* self, const gchar* field, gint64 value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->set_int64 (self, field, value, error);
}


/**
     * Put a double-precision floating point value into a field of a record
     *
     * @param field index of the field to put data into
     * @param value value to put into the field
     * @see set_double
     */
static void sql_heavy_mutable_record_real_put_double (SQLHeavyMutableRecord* self, gint field, gdouble value, GError** error) {
	gint _tmp0_;
	gdouble _tmp1_;
	GValue _tmp2_ = {0};
	GError * _inner_error_ = NULL;
	_tmp0_ = field;
	_tmp1_ = value;
	g_value_init (&_tmp2_, G_TYPE_DOUBLE);
	g_value_set_double (&_tmp2_, _tmp1_);
	sql_heavy_mutable_record_put (self, _tmp0_, &_tmp2_, &_inner_error_);
	G_IS_VALUE (&_tmp2_) ? (g_value_unset (&_tmp2_), NULL) : NULL;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_put_double (SQLHeavyMutableRecord* self, gint field, gdouble value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->put_double (self, field, value, error);
}


/**
     * Put a double-precision floating point value into a named field of a record
     *
     * @param field name of the field to put data into
     * @param value value to put into the field
     * @see put_double
     */
static void sql_heavy_mutable_record_real_set_double (SQLHeavyMutableRecord* self, const gchar* field, gdouble value, GError** error) {
	const gchar* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_;
	gdouble _tmp3_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (field != NULL);
	_tmp0_ = field;
	_tmp1_ = sql_heavy_record_field_index ((SQLHeavyRecord*) self, _tmp0_, &_inner_error_);
	_tmp2_ = _tmp1_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_tmp3_ = value;
	sql_heavy_mutable_record_put_double (self, _tmp2_, _tmp3_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_set_double (SQLHeavyMutableRecord* self, const gchar* field, gdouble value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->set_double (self, field, value, error);
}


/**
     * Put a blob value into a field of a record
     *
     * @param field index of the field to put data into
     * @param value value to put into the field
     * @see set_blob
     */
static void sql_heavy_mutable_record_real_put_blob (SQLHeavyMutableRecord* self, gint field, guint8* value, int value_length1, GError** error) {
	guint8* _tmp0_;
	gint _tmp0__length1;
	GByteArray* _tmp1_;
	GByteArray* ba;
	guint8* _tmp2_;
	gint _tmp2__length1;
	gint _tmp3_;
	GValue _tmp4_ = {0};
	GError * _inner_error_ = NULL;
	_tmp0_ = value;
	_tmp0__length1 = value_length1;
	_tmp1_ = g_byte_array_sized_new ((guint) _tmp0__length1);
	ba = _tmp1_;
	_tmp2_ = value;
	_tmp2__length1 = value_length1;
	g_byte_array_append (ba, _tmp2_, _tmp2__length1);
	_tmp3_ = field;
	g_value_init (&_tmp4_, G_TYPE_BYTE_ARRAY);
	g_value_set_boxed (&_tmp4_, ba);
	sql_heavy_mutable_record_put (self, _tmp3_, &_tmp4_, &_inner_error_);
	G_IS_VALUE (&_tmp4_) ? (g_value_unset (&_tmp4_), NULL) : NULL;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			_g_byte_array_unref0 (ba);
			return;
		} else {
			_g_byte_array_unref0 (ba);
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_g_byte_array_unref0 (ba);
}


void sql_heavy_mutable_record_put_blob (SQLHeavyMutableRecord* self, gint field, guint8* value, int value_length1, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->put_blob (self, field, value, value_length1, error);
}


/**
     * Put a blob value into a field of a record
     *
     * @param field name of the field to put data into
     * @param value value to put into the field
     * @see put_blob
     */
static void sql_heavy_mutable_record_real_set_blob (SQLHeavyMutableRecord* self, const gchar* field, guint8* value, int value_length1, GError** error) {
	const gchar* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_;
	guint8* _tmp3_;
	gint _tmp3__length1;
	GError * _inner_error_ = NULL;
	g_return_if_fail (field != NULL);
	_tmp0_ = field;
	_tmp1_ = sql_heavy_record_field_index ((SQLHeavyRecord*) self, _tmp0_, &_inner_error_);
	_tmp2_ = _tmp1_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_tmp3_ = value;
	_tmp3__length1 = value_length1;
	sql_heavy_mutable_record_put_blob (self, _tmp2_, _tmp3_, _tmp3__length1, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_set_blob (SQLHeavyMutableRecord* self, const gchar* field, guint8* value, int value_length1, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->set_blob (self, field, value, value_length1, error);
}


/**
     * Put a timestamp value into a field of a record
     *
     * @param field index of the field to put data into
     * @param value value to put into the field
     * @see set_time_t
     */
static void sql_heavy_mutable_record_real_put_time_t (SQLHeavyMutableRecord* self, gint field, time_t value, GError** error) {
	gint _tmp0_;
	time_t _tmp1_;
	GError * _inner_error_ = NULL;
	_tmp0_ = field;
	_tmp1_ = value;
	sql_heavy_mutable_record_put_int64 (self, _tmp0_, (gint64) _tmp1_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_put_time_t (SQLHeavyMutableRecord* self, gint field, time_t value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->put_time_t (self, field, value, error);
}


/**
     * Put a timestamp value into a named field of a record
     *
     * @param field name of the field to put data into
     * @param value value to put into the field
     * @see put_time_t
     */
static void sql_heavy_mutable_record_real_set_time_t (SQLHeavyMutableRecord* self, const gchar* field, time_t value, GError** error) {
	const gchar* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_;
	time_t _tmp3_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (field != NULL);
	_tmp0_ = field;
	_tmp1_ = sql_heavy_record_field_index ((SQLHeavyRecord*) self, _tmp0_, &_inner_error_);
	_tmp2_ = _tmp1_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_tmp3_ = value;
	sql_heavy_mutable_record_put_time_t (self, _tmp2_, _tmp3_, &_inner_error_);
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == SQL_HEAVY_ERROR) {
			g_propagate_error (error, _inner_error_);
			return;
		} else {
			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);
			g_clear_error (&_inner_error_);
			return;
		}
	}
}


void sql_heavy_mutable_record_set_time_t (SQLHeavyMutableRecord* self, const gchar* field, time_t value, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->set_time_t (self, field, value, error);
}


/**
     * Write any changes to the record to the database
     *
     * @see put
     */
void sql_heavy_mutable_record_save (SQLHeavyMutableRecord* self, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->save (self, error);
}


/**
     * Delete the record from the database
     */
void sql_heavy_mutable_record_delete (SQLHeavyMutableRecord* self, GError** error) {
	g_return_if_fail (self != NULL);
	SQL_HEAVY_MUTABLE_RECORD_GET_INTERFACE (self)->delete (self, error);
}


static void sql_heavy_mutable_record_base_init (SQLHeavyMutableRecordIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
		iface->set = sql_heavy_mutable_record_real_set;
		iface->put_string = sql_heavy_mutable_record_real_put_string;
		iface->set_string = sql_heavy_mutable_record_real_set_string;
		iface->put_null = sql_heavy_mutable_record_real_put_null;
		iface->set_null = sql_heavy_mutable_record_real_set_null;
		iface->put_int = sql_heavy_mutable_record_real_put_int;
		iface->set_int = sql_heavy_mutable_record_real_set_int;
		iface->put_int64 = sql_heavy_mutable_record_real_put_int64;
		iface->set_int64 = sql_heavy_mutable_record_real_set_int64;
		iface->put_double = sql_heavy_mutable_record_real_put_double;
		iface->set_double = sql_heavy_mutable_record_real_set_double;
		iface->put_blob = sql_heavy_mutable_record_real_put_blob;
		iface->set_blob = sql_heavy_mutable_record_real_set_blob;
		iface->put_time_t = sql_heavy_mutable_record_real_put_time_t;
		iface->set_time_t = sql_heavy_mutable_record_real_set_time_t;
	}
}


/**
   * A record that can be altered or removed
   */
GType sql_heavy_mutable_record_get_type (void) {
	static volatile gsize sql_heavy_mutable_record_type_id__volatile = 0;
	if (g_once_init_enter (&sql_heavy_mutable_record_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SQLHeavyMutableRecordIface), (GBaseInitFunc) sql_heavy_mutable_record_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType sql_heavy_mutable_record_type_id;
		sql_heavy_mutable_record_type_id = g_type_register_static (G_TYPE_INTERFACE, "SQLHeavyMutableRecord", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (sql_heavy_mutable_record_type_id, SQL_HEAVY_TYPE_RECORD);
		g_once_init_leave (&sql_heavy_mutable_record_type_id__volatile, sql_heavy_mutable_record_type_id);
	}
	return sql_heavy_mutable_record_type_id__volatile;
}



