]> saetta.ns0.it Git - libgdaex/commitdiff
Adjustments and test.
authorAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Thu, 26 Aug 2010 06:49:17 +0000 (08:49 +0200)
committerAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Thu, 26 Aug 2010 06:49:17 +0000 (08:49 +0200)
.gitignore
src/gdaex.c

index ace013a13dbc2bf7816c21f41d8c7773b3e583f2..2b69f3227a22d6df7e4d33e7bcc004fbb8fe90bf 100644 (file)
@@ -32,4 +32,4 @@ tests/.deps/
 *.la
 *.bak
 libgdaex*tar*
-tests/test_prefix
+tests/test_prefix*
index 10e83c31dd2c2ed0891713f58d56ff99cddcb1ba..ae751a19fb6d9f933ae882e48b3e7d06f0fd99e1 100644 (file)
@@ -525,7 +525,11 @@ GdaDataModel
                        return NULL;
                }
 
-       gdaex_set_tables_name_prefix_into_statement (gdaex, &stmt);
+       if (priv->tables_name_prefix != NULL
+           && g_strcmp0 (priv->tables_name_prefix, "") != 0)
+               {
+                       gdaex_set_tables_name_prefix_into_statement (gdaex, &stmt);
+               }
 
        error = NULL;
        GdaDataModel *dm = gda_connection_statement_execute_select (priv->gda_conn, stmt, NULL, &error);
@@ -1240,7 +1244,11 @@ gdaex_execute (GdaEx *gdaex, const gchar *sql)
 
        g_signal_emit (gdaex, klass->before_execute_signal_id, 0, stmt);
 
-       gdaex_set_tables_name_prefix_into_statement (gdaex, &stmt);
+       if (priv->tables_name_prefix != NULL
+           && g_strcmp0 (priv->tables_name_prefix, "") != 0)
+               {
+                       gdaex_set_tables_name_prefix_into_statement (gdaex, &stmt);
+               }
 
        error = NULL;
        nrecs = gda_connection_statement_execute_non_select (priv->gda_conn, stmt, NULL, NULL, &error);