*
* Returns:
*/
-const gchar
+gchar
*gdaex_sql_builder_get_sql (GdaExSqlBuilder *sqlb, GdaConnection *cnc, GdaSet *params)
{
gchar *ret;
return ret;
}
+/**
+ * gdaex_sql_builder_query:
+ * @sqlb:
+ * @gdaex:
+ *
+ * Returns: a #GdaDataModel.
+ */
+GdaDataModel
+*gdaex_sql_builder_query (GdaExSqlBuilder *sqlb, GdaEx *gdaex, GdaSet *params)
+{
+ gchar *sql;
+ GdaDataModel *dm;
+
+ g_return_val_if_fail (IS_GDAEX (gdaex), NULL);
+
+ sql = gdaex_sql_builder_get_sql (sqlb, (GdaConnection *)gdaex_get_gdaconnection (gdaex), params);
+
+ dm = gdaex_query (gdaex, sql);
+ g_free (sql);
+
+ return dm;
+}
+
+gint
+gdaex_sql_builder_execute (GdaExSqlBuilder *sqlb, GdaEx *gdaex, GdaSet *params)
+{
+ gchar *sql;
+ GdaDataModel *dm;
+ gint ret;
+
+ g_return_val_if_fail (IS_GDAEX (gdaex), NULL);
+
+ sql = gdaex_sql_builder_get_sql (sqlb, (GdaConnection *)gdaex_get_gdaconnection (gdaex), params);
+
+ ret = gdaex_execute (gdaex, sql);
+ g_free (sql);
+
+ return ret;
+}
+
/* PRIVATE */
static void
gdaex_sql_builder_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
void gdaex_sql_builder_order (GdaExSqlBuilder *sqlb, ...);
GdaSqlBuilder *gdaex_sql_builder_get_gda_sql_builder (GdaExSqlBuilder *sqlb);
-const gchar *gdaex_sql_builder_get_sql (GdaExSqlBuilder *sqlb, GdaConnection *cnc, GdaSet *params);
+gchar *gdaex_sql_builder_get_sql (GdaExSqlBuilder *sqlb, GdaConnection *cnc, GdaSet *params);
+
+GdaDataModel *gdaex_sql_builder_query (GdaExSqlBuilder *sqlb, GdaEx *gdaex, GdaSet *params);
+gint gdaex_sql_builder_execute (GdaExSqlBuilder *sqlb, GdaEx *gdaex, GdaSet *params);
G_END_DECLS