[libgda/LIBGDA_4.0] Marked some functions which manipulate SQL identifier deprecated
- From: Vivien Malerba <vivien src gnome org>
- To: svn-commits-list gnome org
- Subject: [libgda/LIBGDA_4.0] Marked some functions which manipulate SQL identifier deprecated
- Date: Thu, 23 Jul 2009 19:37:25 +0000 (UTC)
commit 62b037ad43559b806c554d49eaa72d4beeebb40f
Author: Vivien Malerba <malerba gnome-db org>
Date: Thu Jul 23 21:28:14 2009 +0200
Marked some functions which manipulate SQL identifier deprecated
* gda_sql_identifier_needs_quotes()
* gda_sql_identifier_add_quotes()
* gda_sql_identifier_remove_quotes()
doc/C/tmpl/gda-sql-statement.sgml | 3 +--
libgda/gda-data-meta-wrapper.c | 1 +
libgda/gda-data-select.c | 1 +
libgda/gda-meta-store.c | 1 +
libgda/gda-meta-struct.h | 2 +-
libgda/gda-statement.c | 1 +
libgda/gda-util.c | 1 +
libgda/sql-parser/gda-statement-struct-util.c | 6 ++++++
libgda/sql-parser/gda-statement-struct-util.h | 9 +++++----
libgda/sqlite/gda-sqlite-provider.c | 1 +
providers/mysql/gda-mysql-provider.c | 2 ++
providers/postgres/gda-postgres-provider.c | 1 +
tests/test-sql-identifier.c | 1 +
tools/command-exec.c | 3 ++-
14 files changed, 25 insertions(+), 8 deletions(-)
---
diff --git a/doc/C/tmpl/gda-sql-statement.sgml b/doc/C/tmpl/gda-sql-statement.sgml
index 3964032..c734238 100644
--- a/doc/C/tmpl/gda-sql-statement.sgml
+++ b/doc/C/tmpl/gda-sql-statement.sgml
@@ -651,8 +651,7 @@ Specifies the type of functions passed to gda_sql_any_part_foreach().
@select: not %NULL if expression is a sub select statement (#GdaSqlStatementSelect or #GdaSqlStatementCompound)
@case_s: not %NULL if expression is a CASE WHEN ... expression
@cast_as: not %NULL if expression must be cast to another data type
- _gda_reserved1:
- _gda_reserved2:
+ value_is_ident:
<!-- ##### FUNCTION gda_sql_expr_new ##### -->
<para>
diff --git a/libgda/gda-data-meta-wrapper.c b/libgda/gda-data-meta-wrapper.c
index 5bc5ee3..a0a437d 100644
--- a/libgda/gda-data-meta-wrapper.c
+++ b/libgda/gda-data-meta-wrapper.c
@@ -20,6 +20,7 @@
* Boston, MA 02111-1307, USA.
*/
+#undef GDA_DISABLE_DEPRECATED
#include "gda-data-meta-wrapper.h"
#include <string.h>
diff --git a/libgda/gda-data-select.c b/libgda/gda-data-select.c
index 98e11e1..e8d848f 100644
--- a/libgda/gda-data-select.c
+++ b/libgda/gda-data-select.c
@@ -20,6 +20,7 @@
* Boston, MA 02111-1307, USA.
*/
+#undef GDA_DISABLE_DEPRECATED
#include <glib/gi18n-lib.h>
#include <libgda/gda-data-model.h>
#include <libgda/gda-data-model-iter.h>
diff --git a/libgda/gda-meta-store.c b/libgda/gda-meta-store.c
index 52886c1..bb79dc4 100644
--- a/libgda/gda-meta-store.c
+++ b/libgda/gda-meta-store.c
@@ -18,6 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
+#undef GDA_DISABLE_DEPRECATED
#include <string.h>
#include <glib/gi18n-lib.h>
#include <libgda/gda-meta-store.h>
diff --git a/libgda/gda-meta-struct.h b/libgda/gda-meta-struct.h
index c5bca80..a1614bf 100644
--- a/libgda/gda-meta-struct.h
+++ b/libgda/gda-meta-struct.h
@@ -166,7 +166,7 @@ typedef struct {
* its contents must not be modified.
*
* Note: @obj_catalog, @obj_schema, @obj_name, @obj_short_name and @obj_full_name are case sensitive:
- * one must call gda_sql_identifier_needs_quotes() to know if is it is necessary to surround by double quotes
+ * one must use gda_sql_identifier_quote() to know if is it is necessary to surround by double quotes
* before using in an SQL statement
*/
typedef struct {
diff --git a/libgda/gda-statement.c b/libgda/gda-statement.c
index 751ed8d..d477404 100644
--- a/libgda/gda-statement.c
+++ b/libgda/gda-statement.c
@@ -18,6 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
+#undef GDA_DISABLE_DEPRECATED
#include <string.h>
#include <glib/gi18n-lib.h>
#include <libgda/gda-statement.h>
diff --git a/libgda/gda-util.c b/libgda/gda-util.c
index 750ed69..1ab2942 100644
--- a/libgda/gda-util.c
+++ b/libgda/gda-util.c
@@ -22,6 +22,7 @@
* Boston, MA 02111-1307, USA.
*/
+#undef GDA_DISABLE_DEPRECATED
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
diff --git a/libgda/sql-parser/gda-statement-struct-util.c b/libgda/sql-parser/gda-statement-struct-util.c
index 9aa363d..f123740 100644
--- a/libgda/sql-parser/gda-statement-struct-util.c
+++ b/libgda/sql-parser/gda-statement-struct-util.c
@@ -145,6 +145,8 @@ _remove_quotes (gchar *str)
* function to tell if an identifier needs to be quoted.
*
* Returns: a new string
+ *
+ * Deprecated: 4.0.3: Use gda_sql_identifier_quote() instead.
*/
gchar *
gda_sql_identifier_add_quotes (const gchar *str)
@@ -305,6 +307,8 @@ _string_is_identifier (const gchar *str)
* </itemizedlist>
*
* Returns: TRUE if @str needs some quotes
+ *
+ * Deprecated: 4.0.3: Not needed anymore because of the gda_sql_identifier_quote()
*/
gboolean
gda_sql_identifier_needs_quotes (const gchar *str)
@@ -358,6 +362,8 @@ gda_sql_identifier_needs_quotes (const gchar *str)
* WARNING: @str must NOT be a composed identifier (<part1>."<part2>" for example)
*
* Returns: @str
+ *
+ * Deprecated: 4.0.3: Not needed anymore because of the gda_sql_identifier_quote()
*/
gchar *
gda_sql_identifier_remove_quotes (gchar *str)
diff --git a/libgda/sql-parser/gda-statement-struct-util.h b/libgda/sql-parser/gda-statement-struct-util.h
index 14a6161..08e68cf 100644
--- a/libgda/sql-parser/gda-statement-struct-util.h
+++ b/libgda/sql-parser/gda-statement-struct-util.h
@@ -27,14 +27,15 @@ G_BEGIN_DECLS
/* utility functions */
gchar *_remove_quotes (gchar *str);
-gchar *gda_sql_identifier_add_quotes (const gchar *str);
-
gchar *_json_quote_string (const gchar *str);
-
gboolean _string_is_identifier (const gchar *str);
-gboolean gda_sql_identifier_needs_quotes (const gchar *str);
gboolean _split_identifier_string (gchar *str, gchar **remain, gchar **last);
+
+#ifndef GDA_DISABLE_DEPRECATED
+gboolean gda_sql_identifier_needs_quotes (const gchar *str);
+gchar *gda_sql_identifier_add_quotes (const gchar *str);
gchar *gda_sql_identifier_remove_quotes (gchar *str);
+#endif
/* to be removed, only here for debug */
gchar *gda_sql_value_stringify (const GValue *value);
diff --git a/libgda/sqlite/gda-sqlite-provider.c b/libgda/sqlite/gda-sqlite-provider.c
index 1d269a4..6806b7a 100644
--- a/libgda/sqlite/gda-sqlite-provider.c
+++ b/libgda/sqlite/gda-sqlite-provider.c
@@ -22,6 +22,7 @@
* Boston, MA 02111-1307, USA.
*/
+#undef GDA_DISABLE_DEPRECATED
#include <stdlib.h>
#include <errno.h>
#include <string.h>
diff --git a/providers/mysql/gda-mysql-provider.c b/providers/mysql/gda-mysql-provider.c
index 7658392..e815bbb 100644
--- a/providers/mysql/gda-mysql-provider.c
+++ b/providers/mysql/gda-mysql-provider.c
@@ -3,6 +3,7 @@
*
* AUTHORS:
* Carlos Savoretti <csavoretti gmail com>
+ * Vivien Malerba <malerba gnome-db org>
*
* This Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
@@ -20,6 +21,7 @@
* Boston, MA 02111-1307, USA.
*/
+#undef GDA_DISABLE_DEPRECATED
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
diff --git a/providers/postgres/gda-postgres-provider.c b/providers/postgres/gda-postgres-provider.c
index ad9955a..b1bff4d 100644
--- a/providers/postgres/gda-postgres-provider.c
+++ b/providers/postgres/gda-postgres-provider.c
@@ -22,6 +22,7 @@
* Boston, MA 02111-1307, USA.
*/
+#undef GDA_DISABLE_DEPRECATED
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
diff --git a/tests/test-sql-identifier.c b/tests/test-sql-identifier.c
index 79dcc6e..8378986 100644
--- a/tests/test-sql-identifier.c
+++ b/tests/test-sql-identifier.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#undef GDA_DISABLE_DEPRECATED
#include <libgda/sql-parser/gda-sql-parser.h>
typedef struct {
diff --git a/tools/command-exec.c b/tools/command-exec.c
index 4af937d..e0c5573 100644
--- a/tools/command-exec.c
+++ b/tools/command-exec.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 - 2008 The GNOME Foundation.
+ * Copyright (C) 2007 - 2009 The GNOME Foundation.
*
* AUTHORS:
* Vivien Malerba <malerba gnome-db org>
@@ -19,6 +19,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#undef GDA_DISABLE_DEPRECATED
#include "command-exec.h"
#include <glib/gi18n-lib.h>
#include <string.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]