GValue *value,
GParamSpec *pspec);
-#define GDAEX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_GDAEX, GdaExPrivate))
-
typedef struct _GdaExPrivate GdaExPrivate;
struct _GdaExPrivate
{
GFileOutputStream *log_file;
};
-G_DEFINE_TYPE (GdaEx, gdaex, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GdaEx, gdaex, G_TYPE_OBJECT)
static void
gdaex_class_init (GdaExClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (GdaExPrivate));
-
object_class->set_property = gdaex_set_property;
object_class->get_property = gdaex_get_property;
{
gchar *localedir;
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
priv->tables_name_prefix = NULL;
priv->debug = 0;
return FALSE;
}
- priv = GDAEX_GET_PRIVATE (gdaex);
+ priv = gdaex_get_instance_private (gdaex);
auth_string = NULL;
new_user = NULL;
return FALSE;
}
- priv = GDAEX_GET_PRIVATE (gdaex);
+ priv = gdaex_get_instance_private (gdaex);
/* open database connection */
error = NULL;
g_return_val_if_fail (IS_GDAEX (gdaex), FALSE);
g_return_val_if_fail (GDA_IS_CONNECTION (conn), FALSE);
- priv = GDAEX_GET_PRIVATE (gdaex);
+ priv = gdaex_get_instance_private (gdaex);
priv->gda_conn = conn;
gchar *msg;
- GdaExPrivate *priv = GDAEX_GET_PRIVATE ((GdaEx *)user_data);
+ GdaExPrivate *priv = gdaex_get_instance_private ((GdaEx *)user_data);
msg = g_strdup_printf ("%s **: %s\n\n", log_domain, message);
gpointer user_data,
GError **error)
{
- GdaExPrivate *priv = GDAEX_GET_PRIVATE ((GdaEx *)user_data);
+ GdaExPrivate *priv = gdaex_get_instance_private ((GdaEx *)user_data);
GError *my_error;
{
g_return_val_if_fail (IS_GDAEX (gdaex), NULL);
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
return priv->gda_conn;
}
{
g_return_val_if_fail (IS_GDAEX (gdaex), NULL);
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
return gda_server_provider_get_name (gda_connection_get_provider (priv->gda_conn));
}
{
g_return_val_if_fail (IS_GDAEX (gdaex), NULL);
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
return priv->gda_parser;
}
{
g_return_val_if_fail (IS_GDAEX (gdaex), NULL);
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
return g_strdup (priv->tables_name_prefix);
}
{
g_return_if_fail (IS_GDAEX (gdaex));
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
if (tables_name_prefix == NULL)
{
GdaStatement *stmp;
GdaSqlStatement *sstmt;
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
stmp = *stmt;
g_object_get (G_OBJECT (stmp), "structure", &sstmt, NULL);
g_return_val_if_fail (IS_GDAEX (gdaex), NULL);
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
error = NULL;
stmt = gda_sql_parser_parse_string (priv->gda_parser, sql, NULL, &error);
g_return_val_if_fail (IS_GDAEX (gdaex), FALSE);
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
error = NULL;
ret = gda_connection_begin_transaction (priv->gda_conn, "gdaex",
g_return_val_if_fail (IS_GDAEX (gdaex), -1);
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
GdaExClass *klass = GDAEX_GET_CLASS (gdaex);
error = NULL;
g_return_val_if_fail (IS_GDAEX (gdaex), NULL);
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
ret = NULL;
g_return_val_if_fail (IS_GDAEX (gdaex), FALSE);
- priv = GDAEX_GET_PRIVATE (gdaex);
+ priv = gdaex_get_instance_private (gdaex);
tstatus = gda_connection_get_transaction_status (priv->gda_conn);
g_return_val_if_fail (IS_GDAEX (gdaex), FALSE);
- priv = GDAEX_GET_PRIVATE (gdaex);
+ priv = gdaex_get_instance_private (gdaex);
tstatus = gda_connection_get_transaction_status (priv->gda_conn);
{
g_return_if_fail (IS_GDAEX (gdaex));
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
/* close connection */
if (gda_connection_is_opened (priv->gda_conn))
g_return_val_if_fail (IS_GDAEX (gdaex), NULL);
- priv = GDAEX_GET_PRIVATE (gdaex);
+ priv = gdaex_get_instance_private (gdaex);
return (const gchar *)g_strdup (priv->guifile);
}
g_return_val_if_fail (IS_GDAEX (gdaex), NULL);
- priv = GDAEX_GET_PRIVATE (gdaex);
+ priv = gdaex_get_instance_private (gdaex);
return priv->gtkbuilder;
}
gchar *ret;
- priv = GDAEX_GET_PRIVATE (gdaex);
+ priv = gdaex_get_instance_private (gdaex);
b = gdaex_get_gda_sqlbuilder_from_hashtable (gdaex,
sqltype,
GError *error;
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
error = NULL;
ret = gda_connection_update_meta_store (priv->gda_conn, mcontext, &error);
GdaMetaContext *mcontext;
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
dm = NULL;
GdaMetaContext *mcontext;
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
dm = NULL;
static void
gdaex_create_connection_parser (GdaEx *gdaex)
{
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
priv->gda_parser = gda_connection_create_parser (priv->gda_conn);
if (priv->gda_parser == NULL) /* @gda_conn doe snot provide its own parser => use default one */
gdaex_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
GdaEx *gdaex = GDAEX (object);
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
switch (property_id)
{
gdaex_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
GdaEx *gdaex = GDAEX (object);
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ GdaExPrivate *priv = gdaex_get_instance_private (gdaex);
switch (property_id)
{
/*
- * Copyright (C) 2011-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2011-2020 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
static void gdaex_query_editor_on_txt2_btn_browse_clicked (gpointer instance, gpointer user_data);
-#define GDAEX_QUERY_EDITOR_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), TYPE_GDAEX_QUERY_EDITOR, GdaExQueryEditorPrivate))
-
typedef struct _GdaExQueryEditorPrivate GdaExQueryEditorPrivate;
struct _GdaExQueryEditorPrivate
{
GtkListStore *lstore_where_type;
};
-G_DEFINE_TYPE (GdaExQueryEditor, gdaex_query_editor, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GdaExQueryEditor, gdaex_query_editor, G_TYPE_OBJECT)
enum
{
object_class->dispose = gdaex_query_editor_dispose;
object_class->finalize = gdaex_query_editor_finalize;
- g_type_class_add_private (object_class, sizeof (GdaExQueryEditorPrivate));
-
/**
* GdaExQueryEditor::iwidget-init:
*
static void
gdaex_query_editor_init (GdaExQueryEditor *gdaex_query_editor)
{
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (gdaex_query_editor);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (gdaex_query_editor);
}
if (g_module_supported ())
{
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (gdaex_query_editor);
+ priv = gdaex_query_editor_get_instance_private (gdaex_query_editor);
modulesdir = (gchar *)g_getenv ("LIBGDAEX_MODULESDIR");
if (modulesdir == NULL)
gdaex_query_editor = GDAEX_QUERY_EDITOR (g_object_new (gdaex_query_editor_get_type (), NULL));
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (gdaex_query_editor);
+ priv = gdaex_query_editor_get_instance_private (gdaex_query_editor);
gdaex_query_editor_clean (gdaex_query_editor);
g_return_val_if_fail (GDAEX_IS_QUERY_EDITOR (gdaex_query_editor), NULL);
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (gdaex_query_editor);
+ priv = gdaex_query_editor_get_instance_private (gdaex_query_editor);
if (priv->hpaned_main == NULL)
{
g_return_if_fail (GDAEX_IS_QUERY_EDITOR (qe));
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
wpage = gtk_notebook_get_nth_page (GTK_NOTEBOOK (priv->notebook), GDAEX_QE_PAGE_SHOW);
if (visibile)
g_return_if_fail (GDAEX_IS_QUERY_EDITOR (qe));
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
wpage = gtk_notebook_get_nth_page (GTK_NOTEBOOK (priv->notebook), GDAEX_QE_PAGE_WHERE);
if (visibile)
g_return_if_fail (GDAEX_IS_QUERY_EDITOR (qe));
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
wpage = gtk_notebook_get_nth_page (GTK_NOTEBOOK (priv->notebook), GDAEX_QE_PAGE_ORDER);
if (visibile)
g_return_val_if_fail (GDAEX_IS_QUERY_EDITOR (qe), FALSE);
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
wpage = gtk_notebook_get_nth_page (GTK_NOTEBOOK (priv->notebook), GDAEX_QE_PAGE_SHOW);
return gtk_widget_get_visible (wpage);
g_return_val_if_fail (GDAEX_IS_QUERY_EDITOR (qe), FALSE);
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
wpage = gtk_notebook_get_nth_page (GTK_NOTEBOOK (priv->notebook), GDAEX_QE_PAGE_WHERE);
return gtk_widget_get_visible (wpage);
g_return_val_if_fail (GDAEX_IS_QUERY_EDITOR (qe), FALSE);
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
wpage = gtk_notebook_get_nth_page (GTK_NOTEBOOK (priv->notebook), GDAEX_QE_PAGE_ORDER);
return gtk_widget_get_visible (wpage);
g_return_val_if_fail (GDAEX_IS_QUERY_EDITOR (qe), FALSE);
g_return_val_if_fail (table_name != NULL, FALSE);
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
table = g_hash_table_lookup (priv->tables, table_name);
if (table == NULL)
g_return_val_if_fail (GDAEX_IS_QUERY_EDITOR (qe), FALSE);
g_return_val_if_fail (fields_joined != NULL, FALSE);
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
create_relation = FALSE;
g_return_val_if_fail (GDAEX_IS_QUERY_EDITOR (qe), FALSE);
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
fields_joined = NULL;
va_start (fields, join_type);
GdaExQueryEditorIWidget *iwidget;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
iwidget = NULL;
for (i = 0; i < priv->ar_modules->len; i++)
klass = GDAEX_QUERY_EDITOR_GET_CLASS (qe);
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (clean)
{
g_return_if_fail (GDAEX_IS_QUERY_EDITOR (qe));
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
gtk_list_store_clear (priv->lstore_show);
gtk_tree_store_clear (priv->tstore_where);
GSList *relations;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (priv->relations == NULL)
{
GdaExQueryEditorPrivate *priv;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
/* check if table is part of a relation */
relation = gdaex_query_editor_get_table_relation (qe, table_name);
GtkTreeIter children;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
id_ret = 0;
g_return_val_if_fail (GDAEX_IS_QUERY_EDITOR (qe), NULL);
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
sqlbuilder = gda_sql_builder_new (GDA_SQL_STATEMENT_SELECT);
return ret;
}
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
error = NULL;
stmt = gda_sql_builder_get_statement (sqlbuilder, &error);
xmlNode *xnode;
GtkTreeIter children;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
do
{
g_return_val_if_fail (GDAEX_IS_QUERY_EDITOR (qe), NULL);
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
ret = xmlNewNode (NULL, "gdaex_query_editor_choices");
g_return_if_fail (xmlStrEqual (root->name, "gdaex_query_editor_choices"));
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (clean)
{
GParamSpec *pspec)
{
GdaExQueryEditor *gdaex_query_editor = (GdaExQueryEditor *)object;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (gdaex_query_editor);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (gdaex_query_editor);
switch (property_id)
{
GParamSpec *pspec)
{
GdaExQueryEditor *gdaex_query_editor = (GdaExQueryEditor *)object;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (gdaex_query_editor);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (gdaex_query_editor);
switch (property_id)
{
gdaex_query_editor_dispose (GObject *object)
{
GdaExQueryEditor *gdaex_query_editor = (GdaExQueryEditor *)object;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (gdaex_query_editor);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (gdaex_query_editor);
gtk_tree_store_clear (priv->tstore_fields);
gtk_list_store_clear (priv->lstore_show);
gdaex_query_editor_finalize (GObject *object)
{
GdaExQueryEditor *gdaex_query_editor = (GdaExQueryEditor *)object;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (gdaex_query_editor);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (gdaex_query_editor);
gtk_widget_destroy (priv->hpaned_main);
static void
gdaex_query_editor_clean (GdaExQueryEditor *gdaex_query_editor)
{
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (gdaex_query_editor);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (gdaex_query_editor);
if (priv->tables != NULL)
{
g_return_val_if_fail (GDAEX_IS_QUERY_EDITOR (qe), FALSE);
g_return_val_if_fail (table_name != NULL, FALSE);
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
table = g_new0 (GdaExQueryEditorTable, 1);
g_return_if_fail (GDAEX_IS_QUERY_EDITOR (qe));
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
gtk_tree_store_clear (priv->tstore_fields);
gpointer key, value;
GdaExQueryEditorField *field;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
g_hash_table_iter_init (&hiter, table->fields);
while (g_hash_table_iter_next (&hiter, &key, &value))
GdaExQueryEditorTable *table;
GdaExQueryEditorField *field;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (priv->tstore_fields), &iter_table))
{
GdaExQueryEditorTable *table;
GdaExQueryEditorField *field;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (priv->tstore_fields), &iter_table))
{
g_return_if_fail (GTK_IS_LIST_STORE (store) || GTK_IS_TREE_STORE (store));
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (gtk_tree_selection_get_selected (sel, NULL, &iter))
{
g_return_if_fail (GTK_IS_LIST_STORE (store) || GTK_IS_TREE_STORE (store));
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (gtk_tree_selection_get_selected (sel, NULL, &iter))
{
static void
gdaex_query_editor_remove_child_from_vbx_values (GdaExQueryEditor *qe)
{
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
GList *children;
GValue *v_table_field;
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "button3")), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "button7")), FALSE);
guint page;
qe = (GdaExQueryEditor *)user_data;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (!gtk_tree_selection_get_selected (priv->sel_fields, NULL, &iter))
{
guint where_type;
qe = (GdaExQueryEditor *)user_data;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (priv->cb_where_type), &iter))
{
GdaExQueryEditorPrivate *priv;
qe = (GdaExQueryEditor *)user_data;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
gdaex_query_editor_remove_child_from_vbx_values (qe);
gtk_widget_hide (priv->vbx_values_container);
gchar *asc_desc_visible;
qe = (GdaExQueryEditor *)user_data;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
val1 = NULL;
val2 = NULL;
{
GdaExQueryEditorPrivate *priv;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE ((GdaExQueryEditor *)user_data);
+ priv = gdaex_query_editor_get_instance_private ((GdaExQueryEditor *)user_data);
if (page_num != GDAEX_QE_PAGE_SHOW)
{
GtkWidget *wpage;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
gtk_tree_model_get (GTK_TREE_MODEL (priv->tstore_fields), iter,
COL_FIELDS_TABLE_NAME, &table_name,
GtkWidget *wpage;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
gtk_tree_model_get (GTK_TREE_MODEL (priv->tstore_fields), iter,
COL_FIELDS_TABLE_NAME, &table_name,
GtkWidget *dialog;
qe = (GdaExQueryEditor *)user_data;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (gtk_tree_selection_get_selected (priv->sel_fields, NULL, &iter))
{
gpointer user_data)
{
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gdaex_query_editor_store_remove_iter (qe,
priv->sel_show,
gpointer user_data)
{
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gdaex_query_editor_store_move_iter_up_down (qe,
priv->sel_show,
gpointer user_data)
{
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gdaex_query_editor_store_move_iter_up_down (qe,
priv->sel_show,
gpointer user_data)
{
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gtk_list_store_clear (priv->lstore_show);
gdaex_query_editor_refill_always_show (qe);
GtkWidget *lbl;
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gtk_widget_hide (priv->vbx_values_container);
gdaex_query_editor_remove_child_from_vbx_values (qe);
GtkWidget *wpage;
qe = (GdaExQueryEditor *)user_data;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (gtk_tree_selection_get_selected (priv->sel_fields, NULL, &iter))
{
gchar *group;
qe = (GdaExQueryEditor *)user_data;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (gtk_tree_selection_get_selected (priv->sel_where, NULL, &iter_parent))
{
GdaExQueryEditorPrivate *priv;
qe = (GdaExQueryEditor *)user_data;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
gdaex_query_editor_store_remove_iter (qe,
priv->sel_where,
GdaExQueryEditorPrivate *priv;
qe = (GdaExQueryEditor *)user_data;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
gdaex_query_editor_store_move_iter_up_down (qe,
priv->sel_where,
GdaExQueryEditorPrivate *priv;
qe = (GdaExQueryEditor *)user_data;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
gdaex_query_editor_store_move_iter_up_down (qe,
priv->sel_where,
gpointer user_data)
{
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gtk_tree_store_clear (priv->tstore_where);
GtkCellRenderer *renderer;
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gtk_widget_hide (priv->vbx_values_container);
gdaex_query_editor_remove_child_from_vbx_values (qe);
GtkWidget *dialog;
qe = (GdaExQueryEditor *)user_data;
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ priv = gdaex_query_editor_get_instance_private (qe);
if (gtk_tree_selection_get_selected (priv->sel_fields, NULL, &iter))
{
gpointer user_data)
{
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gdaex_query_editor_store_remove_iter (qe,
priv->sel_order,
gpointer user_data)
{
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gdaex_query_editor_store_move_iter_up_down (qe,
priv->sel_order,
gpointer user_data)
{
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gdaex_query_editor_store_move_iter_up_down (qe,
priv->sel_order,
gpointer user_data)
{
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gtk_list_store_clear (priv->lstore_order);
gdaex_query_editor_refill_always_order (qe);
GdaExQueryEditorField *field;
GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
- GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+ GdaExQueryEditorPrivate *priv = gdaex_query_editor_get_instance_private (qe);
gtk_widget_hide (priv->vbx_values_container);
gdaex_query_editor_remove_child_from_vbx_values (qe);
/*
- * Copyright (C) 2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2016-2020 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
static const gchar *gdaex_query_editor_check_get_value_sql (GdaExQueryEditorIWidget *iwidget);
static void gdaex_query_editor_check_set_value (GdaExQueryEditorIWidget *iwidget, const gchar *value);
-#define GDAEX_QUERY_EDITOR_CHECK_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_CHECK_BUTTON, GdaExQueryEditorCheckPrivate))
-
typedef struct _GdaExQueryEditorCheckPrivate GdaExQueryEditorCheckPrivate;
struct _GdaExQueryEditorCheckPrivate
{
gpointer foo;
};
-G_DEFINE_TYPE_WITH_CODE (GdaExQueryEditorCheck, gdaex_query_editor_check, GTK_TYPE_CHECK_BUTTON,
- G_IMPLEMENT_INTERFACE (GDAEX_QUERY_EDITOR_TYPE_IWIDGET,
- gdaex_query_editor_check_gdaex_query_editor_iwidget_interface_init));
+G_DEFINE_TYPE_EXTENDED (GdaExQueryEditorCheck, gdaex_query_editor_check, GTK_TYPE_CHECK_BUTTON,
+ 0,
+ G_ADD_PRIVATE (GdaExQueryEditorCheck)
+ G_IMPLEMENT_INTERFACE (GDAEX_QUERY_EDITOR_TYPE_IWIDGET,
+ gdaex_query_editor_check_gdaex_query_editor_iwidget_interface_init));
static void
gdaex_query_editor_check_class_init (GdaExQueryEditorCheckClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (GdaExQueryEditorCheckPrivate));
-
object_class->set_property = gdaex_query_editor_check_set_property;
object_class->get_property = gdaex_query_editor_check_get_property;
}
static void
gdaex_query_editor_check_init (GdaExQueryEditorCheck *check)
{
- GdaExQueryEditorCheckPrivate *priv = GDAEX_QUERY_EDITOR_CHECK_GET_PRIVATE (check);
+ GdaExQueryEditorCheckPrivate *priv = gdaex_query_editor_check_get_instance_private (check);
}
static void
gdaex_query_editor_check_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
GdaExQueryEditorCheck *check = GDAEX_QUERY_EDITOR_CHECK (object);
- GdaExQueryEditorCheckPrivate *priv = GDAEX_QUERY_EDITOR_CHECK_GET_PRIVATE (check);
+ GdaExQueryEditorCheckPrivate *priv = gdaex_query_editor_check_get_instance_private (check);
switch (property_id)
{
gdaex_query_editor_check_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
GdaExQueryEditorCheck *check = GDAEX_QUERY_EDITOR_CHECK (object);
- GdaExQueryEditorCheckPrivate *priv = GDAEX_QUERY_EDITOR_CHECK_GET_PRIVATE (check);
+ GdaExQueryEditorCheckPrivate *priv = gdaex_query_editor_check_get_instance_private (check);
switch (property_id)
{
/*
- * Copyright (C) 2011-2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2011-2020 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
static const gchar *gdaex_query_editor_entry_get_value_sql (GdaExQueryEditorIWidget *iwidget);
static void gdaex_query_editor_entry_set_value (GdaExQueryEditorIWidget *iwidget, const gchar *value);
-#define GDAEX_QUERY_EDITOR_ENTRY_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_ENTRY, GdaExQueryEditorEntryPrivate))
-
typedef struct _GdaExQueryEditorEntryPrivate GdaExQueryEditorEntryPrivate;
struct _GdaExQueryEditorEntryPrivate
{
gpointer foo;
};
-G_DEFINE_TYPE_WITH_CODE (GdaExQueryEditorEntry, gdaex_query_editor_entry, GTK_TYPE_ENTRY,
- G_IMPLEMENT_INTERFACE (GDAEX_QUERY_EDITOR_TYPE_IWIDGET,
- gdaex_query_editor_entry_gdaex_query_editor_iwidget_interface_init));
+G_DEFINE_TYPE_EXTENDED (GdaExQueryEditorEntry, gdaex_query_editor_entry, GTK_TYPE_ENTRY,
+ 0,
+ G_ADD_PRIVATE (GdaExQueryEditorEntry)
+ G_IMPLEMENT_INTERFACE (GDAEX_QUERY_EDITOR_TYPE_IWIDGET,
+ gdaex_query_editor_entry_gdaex_query_editor_iwidget_interface_init));
static void
gdaex_query_editor_entry_class_init (GdaExQueryEditorEntryClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (GdaExQueryEditorEntryPrivate));
-
object_class->set_property = gdaex_query_editor_entry_set_property;
object_class->get_property = gdaex_query_editor_entry_get_property;
}
static void
gdaex_query_editor_entry_init (GdaExQueryEditorEntry *entry)
{
- GdaExQueryEditorEntryPrivate *priv = GDAEX_QUERY_EDITOR_ENTRY_GET_PRIVATE (entry);
+ GdaExQueryEditorEntryPrivate *priv = gdaex_query_editor_entry_get_instance_private (entry);
}
static void
gdaex_query_editor_entry_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
GdaExQueryEditorEntry *entry = GDAEX_QUERY_EDITOR_ENTRY (object);
- GdaExQueryEditorEntryPrivate *priv = GDAEX_QUERY_EDITOR_ENTRY_GET_PRIVATE (entry);
+ GdaExQueryEditorEntryPrivate *priv = gdaex_query_editor_entry_get_instance_private (entry);
switch (property_id)
{
gdaex_query_editor_entry_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
GdaExQueryEditorEntry *entry = GDAEX_QUERY_EDITOR_ENTRY (object);
- GdaExQueryEditorEntryPrivate *priv = GDAEX_QUERY_EDITOR_ENTRY_GET_PRIVATE (entry);
+ GdaExQueryEditorEntryPrivate *priv = gdaex_query_editor_entry_get_instance_private (entry);
switch (property_id)
{
/*
- * Copyright (C) 2016 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2016-2020 Andrea Zagli <azagli@libero.it>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
static const gchar *gdaex_query_editor_entry_date_get_value_sql (GdaExQueryEditorIWidget *iwidget);
static void gdaex_query_editor_entry_date_set_value (GdaExQueryEditorIWidget *iwidget, const gchar *value);
-#define GDAEX_QUERY_EDITOR_ENTRY_DATE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDAEX_QUERY_EDITOR_TYPE_ENTRY_DATE, GdaExQueryEditorEntryDatePrivate))
-
typedef struct _GdaExQueryEditorEntryDatePrivate GdaExQueryEditorEntryDatePrivate;
struct _GdaExQueryEditorEntryDatePrivate
{
gchar *format;
};
-G_DEFINE_TYPE_WITH_CODE (GdaExQueryEditorEntryDate, gdaex_query_editor_entry_date, GTK_TYPE_ENTRY,
- G_IMPLEMENT_INTERFACE (GDAEX_QUERY_EDITOR_TYPE_IWIDGET,
- gdaex_query_editor_entry_date_gdaex_query_editor_iwidget_interface_init));
+G_DEFINE_TYPE_EXTENDED (GdaExQueryEditorEntryDate, gdaex_query_editor_entry_date, GTK_TYPE_ENTRY,
+ 0,
+ G_ADD_PRIVATE (GdaExQueryEditorEntryDate)
+ G_IMPLEMENT_INTERFACE (GDAEX_QUERY_EDITOR_TYPE_IWIDGET,
+ gdaex_query_editor_entry_date_gdaex_query_editor_iwidget_interface_init));
static void
gdaex_query_editor_entry_date_class_init (GdaExQueryEditorEntryDateClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (GdaExQueryEditorEntryDatePrivate));
-
object_class->set_property = gdaex_query_editor_entry_date_set_property;
object_class->get_property = gdaex_query_editor_entry_date_get_property;
}
static void
gdaex_query_editor_entry_date_init (GdaExQueryEditorEntryDate *entry)
{
- GdaExQueryEditorEntryDatePrivate *priv = GDAEX_QUERY_EDITOR_ENTRY_DATE_GET_PRIVATE (entry);
+ GdaExQueryEditorEntryDatePrivate *priv = gdaex_query_editor_entry_date_get_instance_private (entry);
priv->format = NULL;
}
void
gdaex_query_editor_entry_date_set_format (GdaExQueryEditorEntryDate *entry, const gchar *format)
{
- GdaExQueryEditorEntryDatePrivate *priv = GDAEX_QUERY_EDITOR_ENTRY_DATE_GET_PRIVATE (entry);
+ GdaExQueryEditorEntryDatePrivate *priv = gdaex_query_editor_entry_date_get_instance_private (entry);
if (priv->format != NULL)
{
gchar
*gdaex_query_editor_entry_date_get_format (GdaExQueryEditorEntryDate* entry)
{
- GdaExQueryEditorEntryDatePrivate *priv = GDAEX_QUERY_EDITOR_ENTRY_DATE_GET_PRIVATE (entry);
+ GdaExQueryEditorEntryDatePrivate *priv = gdaex_query_editor_entry_date_get_instance_private (entry);
return g_strdup (priv->format);
}
gdaex_query_editor_entry_date_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
GdaExQueryEditorEntryDate *entry = GDAEX_QUERY_EDITOR_ENTRY_DATE (object);
- GdaExQueryEditorEntryDatePrivate *priv = GDAEX_QUERY_EDITOR_ENTRY_DATE_GET_PRIVATE (entry);
+ GdaExQueryEditorEntryDatePrivate *priv = gdaex_query_editor_entry_date_get_instance_private (entry);
switch (property_id)
{
gdaex_query_editor_entry_date_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
GdaExQueryEditorEntryDate *entry = GDAEX_QUERY_EDITOR_ENTRY_DATE (object);
- GdaExQueryEditorEntryDatePrivate *priv = GDAEX_QUERY_EDITOR_ENTRY_DATE_GET_PRIVATE (entry);
+ GdaExQueryEditorEntryDatePrivate *priv = gdaex_query_editor_entry_date_get_instance_private (entry);
switch (property_id)
{
gchar *ret;
GDateTime *gdt;
- GdaExQueryEditorEntryDatePrivate *priv = GDAEX_QUERY_EDITOR_ENTRY_DATE_GET_PRIVATE (GDAEX_QUERY_EDITOR_ENTRY_DATE (iwidget));
+ GdaExQueryEditorEntryDatePrivate *priv = gdaex_query_editor_entry_date_get_instance_private (GDAEX_QUERY_EDITOR_ENTRY_DATE (iwidget));
gdt = zak_utils_get_gdatetime_from_string (gtk_entry_get_text (GTK_ENTRY (iwidget)), priv->format);
ret = g_strdup (zak_utils_gdatetime_to_sql (gdt, NULL));
/*
* sql_builder.c
*
- * Copyright (C) 2010-2019 Andrea Zagli <azagli@libero.it>
+ * Copyright (C) 2010-2020 Andrea Zagli <azagli@libero.it>
*
* This file is part of libgdaex.
*
GParamSpec *pspec);
-#define GDAEX_SQLBUILDER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GDAEX_TYPE_SQLBUILDER, GdaExSqlBuilderPrivate))
-
typedef struct _GdaExSqlBuilderField GdaExSqlBuilderField;
struct _GdaExSqlBuilderField
{
GdaSqlBuilderId id_where;
};
-G_DEFINE_TYPE (GdaExSqlBuilder, gdaex_sql_builder, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GdaExSqlBuilder, gdaex_sql_builder, G_TYPE_OBJECT)
static void
gdaex_sql_builder_class_init (GdaExSqlBuilderClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- g_type_class_add_private (object_class, sizeof (GdaExSqlBuilderPrivate));
-
object_class->set_property = gdaex_sql_builder_set_property;
object_class->get_property = gdaex_sql_builder_get_property;
}
static void
gdaex_sql_builder_init (GdaExSqlBuilder *gdaex_sql_builder)
{
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (gdaex_sql_builder);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (gdaex_sql_builder);
}
{
GdaExSqlBuilder *gdaex_sql_builder = GDAEX_SQLBUILDER (g_object_new (gdaex_sql_builder_get_type (), NULL));
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (gdaex_sql_builder);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (gdaex_sql_builder);
priv->stmt_type = stmt_type;
priv->sqlb = gda_sql_builder_new (priv->stmt_type);
static GdaExSqlBuilderField
*gdaex_sql_builder_get_field (GdaExSqlBuilder *sqlb, GdaExSqlBuilderTable *table, const gchar *field_name, const gchar *field_alias, GValue *gval, gboolean add)
{
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (sqlb);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (sqlb);
GdaExSqlBuilderField *f;
static GdaExSqlBuilderTable
*gdaex_sql_builder_get_table (GdaExSqlBuilder *sqlb, const gchar *table_name, const gchar *table_alias, gboolean add)
{
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (sqlb);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (sqlb);
GdaExSqlBuilderTable *t;
gchar *table_name;
gchar *table_alias;
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (sqlb);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (sqlb);
va_start (ap, sqlb);
do
gchar *tmp;
GdaSqlOperatorType op;
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (sqlb);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (sqlb);
if (priv->stmt_type != GDA_SQL_STATEMENT_SELECT) return;
GdaExSqlBuilderTable *t;
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (sqlb);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (sqlb);
va_start (ap, sqlb);
do
GdaSqlBuilderId id_expr2;
GdaSqlBuilderId id_cond;
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (sqlb);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (sqlb);
if (priv->stmt_type == GDA_SQL_STATEMENT_INSERT)
{
GdaExSqlBuilderTable *t;
GdaExSqlBuilderField *f;
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (sqlb);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (sqlb);
va_start (ap, sqlb);
do
GdaSqlBuilder
*gdaex_sql_builder_get_gda_sql_builder (GdaExSqlBuilder *sqlb)
{
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (sqlb);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (sqlb);
return priv->sqlb;
}
GError *error;
GdaStatement *stmt;
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (sqlb);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (sqlb);
ret = NULL;
gdaex_sql_builder_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
{
GdaExSqlBuilder *gdaex_sql_builder = GDAEX_SQLBUILDER (object);
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (gdaex_sql_builder);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (gdaex_sql_builder);
switch (property_id)
{
gdaex_sql_builder_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
{
GdaExSqlBuilder *gdaex_sql_builder = GDAEX_SQLBUILDER (object);
- GdaExSqlBuilderPrivate *priv = GDAEX_SQLBUILDER_GET_PRIVATE (gdaex_sql_builder);
+ GdaExSqlBuilderPrivate *priv = gdaex_sql_builder_get_instance_private (gdaex_sql_builder);
switch (property_id)
{