static void
gdaex_init (GdaEx *gdaex)
{
+ gchar *localedir;
+
GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ g_message ("Init");
+
priv->tables_name_prefix = NULL;
priv->debug = 0;
- priv->log_file = 0;
-}
-
-static GdaEx
-*gdaex_new_ ()
-{
- gchar *localedir;
-
- GdaEx *gdaex = GDAEX (g_object_new (gdaex_get_type (), NULL));
-
- GdaExPrivate *priv = GDAEX_GET_PRIVATE (gdaex);
+ priv->log_file = NULL;
setlocale (LC_ALL, "");
gda_locale_changed ();
gtk_builder_set_translation_domain (priv->gtkbuilder, GETTEXT_PACKAGE);
g_free (localedir);
-
- return gdaex;
}
/**
return NULL;
}
- gdaex = gdaex_new_ ();
+ gdaex = GDAEX (g_object_new (gdaex_get_type (), NULL));
if (gdaex == NULL)
{
/* TO DO */
return NULL;
}
- gdaex = gdaex_new_ ();
+ gdaex = GDAEX (g_object_new (gdaex_get_type (), NULL));
if (gdaex == NULL)
{
/* TO DO */
g_return_val_if_fail (GDA_IS_CONNECTION (conn), NULL);
- gdaex = gdaex_new_ ();
+ gdaex = GDAEX (g_object_new (gdaex_get_type (), NULL));
priv = GDAEX_GET_PRIVATE (gdaex);
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include <glib/gprintf.h>
+
#include <libgdaex.h>
int
gtk_init (&argc, &argv);
- gdaex = gdaex_new_from_string (g_strdup_printf ("SQLite://DB_DIR=%s;DB_NAME=grid.db", TESTSDIR));
+ //gdaex = gdaex_new_from_string (g_strdup_printf ("SQLite://DB_DIR=%s;DB_NAME=grid.db", TESTSDIR));
+ gdaex = g_object_new (TYPE_GDAEX, NULL);
if (gdaex == NULL)
{
g_error ("Unable to connect to the db.");
}
- sql = g_strdup_printf ("SELECT * FROM clientssss");
+ sql = g_strdup_printf ("SELECT * FROM clients");
dm = gdaex_query (gdaex, sql);
g_free (sql);
+
+ sql = gda_data_model_dump_as_string (dm);
+ g_printf ("%s\n", sql);
+
g_object_unref (dm);
return 0;