gdaex_sql_builder_get_field (sqlb, t, field_name, field_alias, gval, TRUE);
}
+void
+gdaex_sql_builder_field_boolean (GdaExSqlBuilder *sqlb, const gchar *table_name, const gchar *field_name, const gchar *field_alias, gboolean val)
+{
+ GValue *gval;
+
+ gval = g_new0 (GValue, 1);
+ g_value_init (gval, G_TYPE_BOOLEAN);
+ g_value_set_boolean (gval, val);
+
+ gdaex_sql_builder_field (sqlb, table_name, field_name, field_alias, gval);
+
+ g_value_unset (gval);
+}
+
+void
+gdaex_sql_builder_field_int (GdaExSqlBuilder *sqlb, const gchar *table_name, const gchar *field_name, const gchar *field_alias, gint val)
+{
+ GValue *gval;
+
+ gval = g_new0 (GValue, 1);
+ g_value_init (gval, G_TYPE_INT);
+ g_value_set_int (gval, val);
+
+ gdaex_sql_builder_field (sqlb, table_name, field_name, field_alias, gval);
+
+ g_value_unset (gval);
+}
+
+void
+gdaex_sql_builder_field_float (GdaExSqlBuilder *sqlb, const gchar *table_name, const gchar *field_name, const gchar *field_alias, gfloat val)
+{
+ GValue *gval;
+
+ gval = g_new0 (GValue, 1);
+ g_value_init (gval, G_TYPE_FLOAT);
+ g_value_set_float (gval, val);
+
+ gdaex_sql_builder_field (sqlb, table_name, field_name, field_alias, gval);
+
+ g_value_unset (gval);
+}
+
+void
+gdaex_sql_builder_field_string (GdaExSqlBuilder *sqlb, const gchar *table_name, const gchar *field_name, const gchar *field_alias, const gchar *val)
+{
+ GValue *gval;
+
+ gval = g_new0 (GValue, 1);
+ g_value_init (gval, G_TYPE_STRING);
+ g_value_set_string (gval, val);
+
+ gdaex_sql_builder_field (sqlb, table_name, field_name, field_alias, gval);
+
+ g_value_unset (gval);
+}
+
/**
* gdaex_sql_builder_fields:
* @sqlb:
...);
void gdaex_sql_builder_field (GdaExSqlBuilder *sqlb, const gchar *table_name, const gchar *field_name, const gchar *field_alias, GValue *gval);
+void gdaex_sql_builder_field_boolean (GdaExSqlBuilder *sqlb, const gchar *table_name, const gchar *field_name, const gchar *field_alias, gboolean val);
+void gdaex_sql_builder_field_int (GdaExSqlBuilder *sqlb, const gchar *table_name, const gchar *field_name, const gchar *field_alias, gint val);
+void gdaex_sql_builder_field_float (GdaExSqlBuilder *sqlb, const gchar *table_name, const gchar *field_name, const gchar *field_alias, gfloat val);
+void gdaex_sql_builder_field_string (GdaExSqlBuilder *sqlb, const gchar *table_name, const gchar *field_name, const gchar *field_alias, const gchar *val);
void gdaex_sql_builder_fields (GdaExSqlBuilder *sqlb, ...);
GdaSqlBuilderId gdaex_sql_builder_where (GdaExSqlBuilder *sqlb, GdaSqlOperatorType op,
g_object_unref (sqlb);
+ sqlb = gdaex_sql_builder_new (GDA_SQL_STATEMENT_INSERT);
+
+ gdaex_sql_builder_from_v (sqlb,
+ "pippo", "pluto",
+ NULL);
+
+ gdaex_sql_builder_field_boolean (sqlb, "pippo", "married", "", FALSE);
+ gdaex_sql_builder_field_int (sqlb, "pippo", "id", "", 44);
+ gdaex_sql_builder_field_string (sqlb, "pippo", "named", "", "the field value'");
+ gdaex_sql_builder_field_float (sqlb, "pippo", "income", "", 4128.65);
+
+ g_message ("sql: %s", gdaex_sql_builder_get_sql (sqlb, NULL, NULL));
+
+ g_object_unref (sqlb);
+
return 0;
}