[libgda] Corrections to GdaSqlStatement's SQL rendering



commit 9c6975f8c5c8b866e2e52d3148c362e5ba3f874d
Author: Vivien Malerba <malerba gnome-db org>
Date:   Fri Jan 15 19:11:57 2010 +0100

    Corrections to GdaSqlStatement's SQL rendering

 providers/jdbc/gda-jdbc-provider.c                 |    6 +++++-
 providers/postgres/gda-postgres-provider.c         |    6 +++++-
 .../skel-implementation/capi/gda-capi-provider.c   |    8 +++++++-
 providers/web/gda-web-provider.c                   |    6 +++++-
 4 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/providers/jdbc/gda-jdbc-provider.c b/providers/jdbc/gda-jdbc-provider.c
index 10fcae9..95fff4f 100644
--- a/providers/jdbc/gda-jdbc-provider.c
+++ b/providers/jdbc/gda-jdbc-provider.c
@@ -187,7 +187,8 @@ gda_jdbc_provider_class_init (GdaJdbcProviderClass *klass)
         provider_class->delete_savepoint = gda_jdbc_provider_delete_savepoint;
 
 	provider_class->create_parser = NULL;
-	provider_class->statement_to_sql = gda_jdbc_provider_statement_to_sql;
+	provider_class->statement_to_sql = NULL; /* don't use gda_jdbc_provider_statement_to_sql()
+						  * because it only calls gda_statement_to_sql_extended() */
 	provider_class->statement_prepare = gda_jdbc_provider_statement_prepare;
 	provider_class->statement_execute = gda_jdbc_provider_statement_execute;
 
@@ -1010,6 +1011,9 @@ gda_jdbc_provider_get_default_dbms_type (GdaServerProvider *provider, GdaConnect
  * The implementation show here simply calls gda_statement_to_sql_extended() but the rendering
  * can be specialized to the database's SQL dialect, see the implementation of gda_statement_to_sql_extended()
  * and SQLite's specialized rendering for more details
+ *
+ * NOTE: This implementation MUST NOT call gda_statement_to_sql_extended() if it is
+ *       the GdaServerProvider::statement_to_sql() virtual method's implementation
  */
 static gchar *
 gda_jdbc_provider_statement_to_sql (GdaServerProvider *provider, GdaConnection *cnc,
diff --git a/providers/postgres/gda-postgres-provider.c b/providers/postgres/gda-postgres-provider.c
index 8db87ec..6a82fa5 100644
--- a/providers/postgres/gda-postgres-provider.c
+++ b/providers/postgres/gda-postgres-provider.c
@@ -212,7 +212,8 @@ gda_postgres_provider_class_init (GdaPostgresProviderClass *klass)
         provider_class->delete_savepoint = gda_postgres_provider_delete_savepoint;
 
 	provider_class->create_parser = gda_postgres_provider_create_parser;
-	provider_class->statement_to_sql = gda_postgres_provider_statement_to_sql;
+	provider_class->statement_to_sql = NULL; /* don't use gda_postgres_provider_statement_to_sql()
+						  * because it only calls gda_statement_to_sql_extended() */
 	provider_class->statement_prepare = gda_postgres_provider_statement_prepare;
 	provider_class->statement_execute = gda_postgres_provider_statement_execute;
 
@@ -1416,6 +1417,9 @@ gda_postgres_provider_create_parser (GdaServerProvider *provider, GdaConnection
  * The implementation show here simply calls gda_statement_to_sql_extended() but the rendering
  * can be specialized to the database's SQL dialect, see the implementation of gda_statement_to_sql_extended()
  * and SQLite's specialized rendering for more details
+ *
+ * NOTE: This implementation MUST NOT call gda_statement_to_sql_extended() if it is
+ *       the GdaServerProvider::statement_to_sql() virtual method's implementation
  */
 static gchar *
 gda_postgres_provider_statement_to_sql (GdaServerProvider *provider, GdaConnection *cnc,
diff --git a/providers/skel-implementation/capi/gda-capi-provider.c b/providers/skel-implementation/capi/gda-capi-provider.c
index 0617605..cca19ed 100644
--- a/providers/skel-implementation/capi/gda-capi-provider.c
+++ b/providers/skel-implementation/capi/gda-capi-provider.c
@@ -185,7 +185,10 @@ gda_capi_provider_class_init (GdaCapiProviderClass *klass)
         provider_class->delete_savepoint = gda_capi_provider_delete_savepoint;
 
 	provider_class->create_parser = gda_capi_provider_create_parser;
-	provider_class->statement_to_sql = gda_capi_provider_statement_to_sql;
+	provider_class->statement_to_sql = NULL; /* don't use gda_capi_provider_statement_to_sql()
+						  * because it only calls gda_statement_to_sql_extended().
+						  * Set it to gda_capi_provider_statement_to_sql() if it does
+						  * not call calls gda_statement_to_sql_extended() */
 	provider_class->statement_prepare = gda_capi_provider_statement_prepare;
 	provider_class->statement_execute = gda_capi_provider_statement_execute;
 
@@ -887,6 +890,9 @@ gda_capi_provider_create_parser (GdaServerProvider *provider, GdaConnection *cnc
  * The implementation show here simply calls gda_statement_to_sql_extended() but the rendering
  * can be specialized to the database's SQL dialect, see the implementation of gda_statement_to_sql_extended()
  * and SQLite's specialized rendering for more details
+ *
+ * NOTE: This implementation MUST NOT call gda_statement_to_sql_extended() if it is
+ *       the GdaServerProvider::statement_to_sql() virtual method's implementation
  */
 static gchar *
 gda_capi_provider_statement_to_sql (GdaServerProvider *provider, GdaConnection *cnc,
diff --git a/providers/web/gda-web-provider.c b/providers/web/gda-web-provider.c
index 02514b2..cc3c8d4 100644
--- a/providers/web/gda-web-provider.c
+++ b/providers/web/gda-web-provider.c
@@ -158,7 +158,8 @@ gda_web_provider_class_init (GdaWebProviderClass *klass)
         provider_class->delete_savepoint = gda_web_provider_delete_savepoint;
 
 	provider_class->create_parser = gda_web_provider_create_parser;
-	provider_class->statement_to_sql = gda_web_provider_statement_to_sql;
+	provider_class->statement_to_sql =  NULL; /* don't use gda_web_provider_statement_to_sql()
+						   * because it only calls gda_statement_to_sql_extended() */
 	provider_class->statement_prepare = gda_web_provider_statement_prepare;
 	provider_class->statement_execute = gda_web_provider_statement_execute;
 
@@ -1119,6 +1120,9 @@ gda_web_provider_create_parser (GdaServerProvider *provider, GdaConnection *cnc)
  * The implementation show here simply calls gda_statement_to_sql_extended() but the rendering
  * can be specialized to the database's SQL dialect, see the implementation of gda_statement_to_sql_extended()
  * and SQLite's specialized rendering for more details
+ *
+ * NOTE: This implementation MUST NOT call gda_statement_to_sql_extended() if it is
+ *       the GdaServerProvider::statement_to_sql() virtual method's implementation
  */
 static gchar *
 gda_web_provider_statement_to_sql (GdaServerProvider *provider, GdaConnection *cnc,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]