gnomemm r1539 - in libgdamm/branches/libgdamm-4-0: . libgda/src tools/extra_defs_gen tools/m4
- From: jhs svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1539 - in libgdamm/branches/libgdamm-4-0: . libgda/src tools/extra_defs_gen tools/m4
- Date: Wed, 28 May 2008 14:46:46 +0000 (UTC)
Author: jhs
Date: Wed May 28 14:46:45 2008
New Revision: 1539
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1539&view=rev
Log:
2008-05-28 Johannes Schmid <johannes schmid openismus com>
* README:
Added a note about sql-parser
* libgda/src/Makefile_list_of_hg.am_fragment:
* libgda/src/batch.ccg:
* libgda/src/batch.hg:
* libgda/src/connection.ccg:
* libgda/src/connection.hg:
* libgda/src/datahandler.ccg:
* libgda/src/libgda_enums.defs:
* libgda/src/libgda_methods.defs:
* libgda/src/libgda_signals.defs:
* libgda/src/metastore.ccg:
* libgda/src/metastore.hg:
* libgda/src/metastruct.ccg:
* libgda/src/metastruct.hg:
* libgda/src/sqlparser.ccg:
* libgda/src/sqlparser.hg:
* tools/extra_defs_gen/generate_defs_gda.cc:
* tools/m4/convert_libgdamm.m4:
Wrapped more classes and startet to fix build
Added:
libgdamm/branches/libgdamm-4-0/libgda/src/batch.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/batch.hg
libgdamm/branches/libgdamm-4-0/libgda/src/metastore.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/metastore.hg
libgdamm/branches/libgdamm-4-0/libgda/src/metastruct.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/metastruct.hg
libgdamm/branches/libgdamm-4-0/libgda/src/sqlparser.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/sqlparser.hg
Modified:
libgdamm/branches/libgdamm-4-0/README
libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment
libgdamm/branches/libgdamm-4-0/libgda/src/connection.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg
libgdamm/branches/libgdamm-4-0/libgda/src/datahandler.ccg
libgdamm/branches/libgdamm-4-0/libgda/src/libgda_enums.defs
libgdamm/branches/libgdamm-4-0/libgda/src/libgda_methods.defs
libgdamm/branches/libgdamm-4-0/libgda/src/libgda_signals.defs
libgdamm/branches/libgdamm-4-0/tools/extra_defs_gen/generate_defs_gda.cc
libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4
Modified: libgdamm/branches/libgdamm-4-0/README
==============================================================================
--- libgdamm/branches/libgdamm-4-0/README (original)
+++ libgdamm/branches/libgdamm-4-0/README Wed May 28 14:46:45 2008
@@ -2,3 +2,5 @@
The library is under the LGPL license.
The examples are under the GPL license.
+
+Note: .defs fils have to be generated on libgda/ and on sql-parser/ directory!
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/Makefile_list_of_hg.am_fragment Wed May 28 14:46:45 2008
@@ -10,7 +10,8 @@
handlerstring.hg handlerboolean.hg handlertime.hg \
handlernumerical.hg handlerbin.hg handlertype.hg \
serverprovider.hg serveroperation.hg transactionstatus.hg \
- set.hg row.hg column.hg holder.hg statement.hg
+ set.hg row.hg column.hg holder.hg statement.hg sqlparser.hg \
+ batch.hg metastore.hg metastruct.hg
Added: libgdamm/branches/libgdamm-4-0/libgda/src/batch.ccg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/batch.ccg Wed May 28 14:46:45 2008
@@ -0,0 +1,29 @@
+// -*- C++ -*- // this is for the .ccg, I realize gensig puts one in
+
+/* batch.cc
+ *
+ * Copyright 2003 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgdamm/batch.h>
+
+namespace Gnome
+{
+
+
+} /* namespace Gnome */
+
Added: libgdamm/branches/libgdamm-4-0/libgda/src/batch.hg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/batch.hg Wed May 28 14:46:45 2008
@@ -0,0 +1,58 @@
+// -*- C++ -*- // this is for the .hg, I realize gensig puts one in
+
+/* set.h
+ *
+ * Copyright 2006 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgdamm/holder.h>
+
+_DEFS(libgdamm,libgda)
+_PINCLUDE(libgdamm/private/object_p.h)
+
+namespace Gnome
+{
+
+namespace Gda
+{
+
+/** Container for several values
+ *
+ * @ingroup Connection
+ */
+class Batch : public Glib::Object
+{
+ _CLASS_GOBJECT(Batch, GdaBatch, GDA_BATCH, Glib::Object, GObject)
+public:
+ _WRAP_CREATE()
+
+ _WRAP_METHOD(void gda_batch_add_statement(const Glib::RefPtr<Statement>& stmt), gda_batch_add_statement)
+ _WRAP_METHOD(void gda_batch_remove_statement(const Glib::RefPtr<Statement>& stmt), gda_batch_remove_statement)
+ _WRAP_METHOD(Glib::ustring gda_batch_serialize(), gda_batch_serialize)
+
+ typedef Glib::SListHandle<const Statement> StatementSList;
+ #m4 _CONVERSION(`const GSList*', `StatementSList', __FL2H_SHALLOW)
+ _WRAP_METHOD(StatementSList get_statements(), gda_batch_get_statements)
+
+ #m4 _CONVERSION(`GObject*',`Glib::RefPtr<Statement>',`Glib::wrap($3)')
+ #m4 _CONVERSION(`Glib::RefPtr<Statement>', `GObject*', G_OBJECT($3.gobj())')
+ _WRAP_SIGNAL(void changed(Glib::RefPtr<Statement> stmt), "changed")
+};
+
+} // namespace Gda
+} // namespace Gnome
+
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/connection.ccg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/connection.ccg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/connection.ccg Wed May 28 14:46:45 2008
@@ -42,24 +42,6 @@
}
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
-Glib::RefPtr<DataModel> Connection::execute_select_command(const Command& cmd)
-#else
-Glib::RefPtr<DataModel> Connection::execute_select_command(const Command& cmd, std::auto_ptr<Glib::Error>& error)
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-{
- GError *gerror = 0;
- Glib::RefPtr<DataModel> retvalue = Glib::wrap(gda_connection_execute_select_command(gobj(), const_cast<GdaCommand*>((cmd).gobj()), 0, &(gerror)));
-
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
- if(gerror) ::Glib::Error::throw_exception(gerror);
-#else
- if(gerror) error = ::Glib::Error::throw_exception(gerror);
-#endif // GLIBMM_EXCEPTIONS_ENABLED
-
- return retvalue;
-}
-
void Connection::close()
{
//gda_connection_close() does an unref, but we don't want that:
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/connection.hg Wed May 28 14:46:45 2008
@@ -24,6 +24,9 @@
#include <libgdamm/connectionevent.h>
#include <libgdamm/datamodel.h>
#include <libgdamm/statement.h>
+#include <libgdamm/sqlparser.h>
+
+#include <libgda/gda-meta-store.h>
_DEFS(libgdamm,libgda)
_PINCLUDE(glibmm/private/object_p.h)
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/datahandler.ccg
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/datahandler.ccg (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/datahandler.ccg Wed May 28 14:46:45 2008
@@ -31,31 +31,6 @@
namespace Gda
{
-Value DataHandler::get_value_from_sql(const Glib::ustring& sql, GType type) const
-{
- return Value(gda_data_handler_get_value_from_sql(const_cast<GdaDataHandler*>(gobj()), sql.c_str(), type));
-}
-
-Value DataHandler::get_value_from_str(const Glib::ustring& str, GType type) const
-{
- GValue* cvalue = gda_data_handler_get_value_from_str(const_cast<GdaDataHandler*>(gobj()), str.c_str(), type);
- Value value(cvalue);
-
- // The C documentation says that it returns a new value:
- if(G_IS_VALUE(cvalue)) g_value_unset(cvalue);
- return value;
-}
-
-Value DataHandler::get_sane_init_value(GType type) const
-{
- GValue* cvalue = gda_data_handler_get_sane_init_value(const_cast<GdaDataHandler*>(gobj()), type);
- Value value(cvalue);
-
- // The C documentation says that it returns a new value:
- if(G_IS_VALUE(cvalue)) g_value_unset(cvalue);
- return value;
-}
-
} /* namespace Gda */
} /* namespace Gnome */
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/libgda_enums.defs
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/libgda_enums.defs (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/libgda_enums.defs Wed May 28 14:46:45 2008
@@ -587,3 +587,166 @@
)
)
+;; From /usr/include/libgda-4.0/sql-parser/gda-sql-parser.h
+
+(define-enum-extended SqlParserError
+ (in-module "Gda")
+ (c-name "GdaSqlParserError")
+ (values
+ '("syntax-error" "GDA_SQL_PARSER_SYNTAX_ERROR" "0")
+ '("overflow-error" "GDA_SQL_PARSER_OVERFLOW_ERROR" "1")
+ '("empty-sql-error" "GDA_SQL_PARSER_EMPTY_SQL_ERROR" "2")
+ )
+)
+
+(define-enum-extended SqlParserMode
+ (in-module "Gda")
+ (c-name "GdaSqlParserMode")
+ (values
+ '("parse" "GDA_SQL_PARSER_MODE_PARSE" "0")
+ '("delimit" "GDA_SQL_PARSER_MODE_DELIMIT" "1")
+ )
+)
+
+(define-enum-extended SqlParserFlavour
+ (in-module "Gda")
+ (c-name "GdaSqlParserFlavour")
+ (values
+ '("standard" "GDA_SQL_PARSER_FLAVOUR_STANDARD" "0")
+ '("sqlite" "GDA_SQL_PARSER_FLAVOUR_SQLITE" "1")
+ '("mysql" "GDA_SQL_PARSER_FLAVOUR_MYSQL" "2")
+ '("oracle" "GDA_SQL_PARSER_FLAVOUR_ORACLE" "3")
+ '("postgresql" "GDA_SQL_PARSER_FLAVOUR_POSTGRESQL" "4")
+ )
+)
+
+;; From /usr/include/libgda-4.0/sql-parser/gda-statement-struct-compound.h
+
+(define-enum-extended SqlStatementCompoundType
+ (in-module "Gda")
+ (c-name "GdaSqlStatementCompoundType")
+ (values
+ '("union" "GDA_SQL_STATEMENT_COMPOUND_UNION" "0")
+ '("union-all" "GDA_SQL_STATEMENT_COMPOUND_UNION_ALL" "1")
+ '("intersect" "GDA_SQL_STATEMENT_COMPOUND_INTERSECT" "2")
+ '("intersect-all" "GDA_SQL_STATEMENT_COMPOUND_INTERSECT_ALL" "3")
+ '("except" "GDA_SQL_STATEMENT_COMPOUND_EXCEPT" "4")
+ '("except-all" "GDA_SQL_STATEMENT_COMPOUND_EXCEPT_ALL" "5")
+ )
+)
+
+;; From /usr/include/libgda-4.0/sql-parser/gda-statement-struct-decl.h
+
+(define-enum-extended SqlErrorType
+ (in-module "Gda")
+ (c-name "GdaSqlErrorType")
+ (values
+ '("structure-contents-error" "GDA_SQL_STRUCTURE_CONTENTS_ERROR" "0")
+ '("malformed-identifier-error" "GDA_SQL_MALFORMED_IDENTIFIER_ERROR" "1")
+ '("missing-identifier-error" "GDA_SQL_MISSING_IDENTIFIER_ERROR" "2")
+ '("validation-error" "GDA_SQL_VALIDATION_ERROR" "3")
+ )
+)
+
+(define-enum-extended SqlStatementType
+ (in-module "Gda")
+ (c-name "GdaSqlStatementType")
+ (values
+ '("select" "GDA_SQL_STATEMENT_SELECT" "0")
+ '("insert" "GDA_SQL_STATEMENT_INSERT" "1")
+ '("update" "GDA_SQL_STATEMENT_UPDATE" "2")
+ '("delete" "GDA_SQL_STATEMENT_DELETE" "3")
+ '("compound" "GDA_SQL_STATEMENT_COMPOUND" "4")
+ '("begin" "GDA_SQL_STATEMENT_BEGIN" "5")
+ '("rollback" "GDA_SQL_STATEMENT_ROLLBACK" "6")
+ '("commit" "GDA_SQL_STATEMENT_COMMIT" "7")
+ '("savepoint" "GDA_SQL_STATEMENT_SAVEPOINT" "8")
+ '("rollback-savepoint" "GDA_SQL_STATEMENT_ROLLBACK_SAVEPOINT" "9")
+ '("delete-savepoint" "GDA_SQL_STATEMENT_DELETE_SAVEPOINT" "10")
+ '("unknown" "GDA_SQL_STATEMENT_UNKNOWN" "11")
+ '("none" "GDA_SQL_STATEMENT_NONE" "12")
+ )
+)
+
+(define-enum-extended SqlAnyPartType
+ (in-module "Gda")
+ (c-name "GdaSqlAnyPartType")
+ (values
+ '("stmt-select" "GDA_SQL_ANY_STMT_SELECT" "#error")
+ '("stmt-insert" "GDA_SQL_ANY_STMT_INSERT" "1")
+ '("stmt-update" "GDA_SQL_ANY_STMT_UPDATE" "2")
+ '("stmt-delete" "GDA_SQL_ANY_STMT_DELETE" "3")
+ '("stmt-compound" "GDA_SQL_ANY_STMT_COMPOUND" "4")
+ '("stmt-begin" "GDA_SQL_ANY_STMT_BEGIN" "5")
+ '("stmt-rollback" "GDA_SQL_ANY_STMT_ROLLBACK" "6")
+ '("stmt-commit" "GDA_SQL_ANY_STMT_COMMIT" "7")
+ '("stmt-savepoint" "GDA_SQL_ANY_STMT_SAVEPOINT" "8")
+ '("stmt-rollback-savepoint" "GDA_SQL_ANY_STMT_ROLLBACK_SAVEPOINT" "9")
+ '("stmt-delete-savepoint" "GDA_SQL_ANY_STMT_DELETE_SAVEPOINT" "10")
+ '("stmt-unknown" "GDA_SQL_ANY_STMT_UNKNOWN" "11")
+ '("expr" "GDA_SQL_ANY_EXPR" "500")
+ '("sql-field" "GDA_SQL_ANY_SQL_FIELD" "501")
+ '("sql-table" "GDA_SQL_ANY_SQL_TABLE" "502")
+ '("sql-function" "GDA_SQL_ANY_SQL_FUNCTION" "503")
+ '("sql-operation" "GDA_SQL_ANY_SQL_OPERATION" "504")
+ '("sql-case" "GDA_SQL_ANY_SQL_CASE" "505")
+ '("sql-select-field" "GDA_SQL_ANY_SQL_SELECT_FIELD" "506")
+ '("sql-select-target" "GDA_SQL_ANY_SQL_SELECT_TARGET" "507")
+ '("sql-select-join" "GDA_SQL_ANY_SQL_SELECT_JOIN" "508")
+ '("sql-select-from" "GDA_SQL_ANY_SQL_SELECT_FROM" "509")
+ '("sql-select-order" "GDA_SQL_ANY_SQL_SELECT_ORDER" "510")
+ )
+)
+
+;; From /usr/include/libgda-4.0/sql-parser/gda-statement-struct-parts.h
+
+(define-enum-extended SqlOperatorType
+ (in-module "Gda")
+ (c-name "GdaSqlOperatorType")
+ (values
+ '("and" "GDA_SQL_OPERATOR_TYPE_AND" "0")
+ '("or" "GDA_SQL_OPERATOR_TYPE_OR" "1")
+ '("eq" "GDA_SQL_OPERATOR_TYPE_EQ" "2")
+ '("is" "GDA_SQL_OPERATOR_TYPE_IS" "3")
+ '("like" "GDA_SQL_OPERATOR_TYPE_LIKE" "4")
+ '("between" "GDA_SQL_OPERATOR_TYPE_BETWEEN" "5")
+ '("gt" "GDA_SQL_OPERATOR_TYPE_GT" "6")
+ '("lt" "GDA_SQL_OPERATOR_TYPE_LT" "7")
+ '("geq" "GDA_SQL_OPERATOR_TYPE_GEQ" "8")
+ '("leq" "GDA_SQL_OPERATOR_TYPE_LEQ" "9")
+ '("diff" "GDA_SQL_OPERATOR_TYPE_DIFF" "10")
+ '("regexp" "GDA_SQL_OPERATOR_TYPE_REGEXP" "11")
+ '("regexp-ci" "GDA_SQL_OPERATOR_TYPE_REGEXP_CI" "12")
+ '("not-regexp" "GDA_SQL_OPERATOR_TYPE_NOT_REGEXP" "13")
+ '("not-regexp-ci" "GDA_SQL_OPERATOR_TYPE_NOT_REGEXP_CI" "14")
+ '("similar" "GDA_SQL_OPERATOR_TYPE_SIMILAR" "15")
+ '("isnull" "GDA_SQL_OPERATOR_TYPE_ISNULL" "16")
+ '("isnotnull" "GDA_SQL_OPERATOR_TYPE_ISNOTNULL" "17")
+ '("not" "GDA_SQL_OPERATOR_TYPE_NOT" "18")
+ '("in" "GDA_SQL_OPERATOR_TYPE_IN" "19")
+ '("notin" "GDA_SQL_OPERATOR_TYPE_NOTIN" "20")
+ '("concat" "GDA_SQL_OPERATOR_TYPE_CONCAT" "21")
+ '("plus" "GDA_SQL_OPERATOR_TYPE_PLUS" "22")
+ '("minus" "GDA_SQL_OPERATOR_TYPE_MINUS" "23")
+ '("star" "GDA_SQL_OPERATOR_TYPE_STAR" "24")
+ '("div" "GDA_SQL_OPERATOR_TYPE_DIV" "25")
+ '("rem" "GDA_SQL_OPERATOR_TYPE_REM" "26")
+ '("bitand" "GDA_SQL_OPERATOR_TYPE_BITAND" "27")
+ '("bitor" "GDA_SQL_OPERATOR_TYPE_BITOR" "28")
+ '("bitnot" "GDA_SQL_OPERATOR_TYPE_BITNOT" "29")
+ )
+)
+
+(define-enum-extended SqlSelectJoinType
+ (in-module "Gda")
+ (c-name "GdaSqlSelectJoinType")
+ (values
+ '("cross" "GDA_SQL_SELECT_JOIN_CROSS" "0")
+ '("natural" "GDA_SQL_SELECT_JOIN_NATURAL" "1")
+ '("inner" "GDA_SQL_SELECT_JOIN_INNER" "2")
+ '("left" "GDA_SQL_SELECT_JOIN_LEFT" "3")
+ '("right" "GDA_SQL_SELECT_JOIN_RIGHT" "4")
+ '("full" "GDA_SQL_SELECT_JOIN_FULL" "5")
+ )
+)
+
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/libgda_methods.defs
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/libgda_methods.defs (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/libgda_methods.defs Wed May 28 14:46:45 2008
@@ -6142,3 +6142,1303 @@
)
+;; -*- scheme -*-
+; object definitions ...
+(define-object SqlParser
+ (in-module "Gda")
+ (parent "GObject")
+ (c-name "GdaSqlParser")
+ (gtype-id "GDA_TYPE_SQL_PARSER")
+)
+
+;; Enumerations and flags ...
+
+(define-enum SqlParserError
+ (in-module "Gda")
+ (c-name "GdaSqlParserError")
+ (gtype-id "GDA_TYPE_SQL_PARSER_ERROR")
+ (values
+ '("syntax-error" "GDA_SQL_PARSER_SYNTAX_ERROR")
+ '("overflow-error" "GDA_SQL_PARSER_OVERFLOW_ERROR")
+ '("empty-sql-error" "GDA_SQL_PARSER_EMPTY_SQL_ERROR")
+ )
+)
+
+(define-enum SqlParserMode
+ (in-module "Gda")
+ (c-name "GdaSqlParserMode")
+ (gtype-id "GDA_TYPE_SQL_PARSER_MODE")
+ (values
+ '("parse" "GDA_SQL_PARSER_MODE_PARSE")
+ '("delimit" "GDA_SQL_PARSER_MODE_DELIMIT")
+ )
+)
+
+(define-enum SqlParserFlavour
+ (in-module "Gda")
+ (c-name "GdaSqlParserFlavour")
+ (gtype-id "GDA_TYPE_SQL_PARSER_FLAVOUR")
+ (values
+ '("standard" "GDA_SQL_PARSER_FLAVOUR_STANDARD")
+ '("sqlite" "GDA_SQL_PARSER_FLAVOUR_SQLITE")
+ '("mysql" "GDA_SQL_PARSER_FLAVOUR_MYSQL")
+ '("oracle" "GDA_SQL_PARSER_FLAVOUR_ORACLE")
+ '("postgresql" "GDA_SQL_PARSER_FLAVOUR_POSTGRESQL")
+ )
+)
+
+(define-enum SqlStatementCompoundType
+ (in-module "Gda")
+ (c-name "GdaSqlStatementCompoundType")
+ (gtype-id "GDA_TYPE_SQL_STATEMENT_COMPOUND_TYPE")
+ (values
+ '("union" "GDA_SQL_STATEMENT_COMPOUND_UNION")
+ '("union-all" "GDA_SQL_STATEMENT_COMPOUND_UNION_ALL")
+ '("intersect" "GDA_SQL_STATEMENT_COMPOUND_INTERSECT")
+ '("intersect-all" "GDA_SQL_STATEMENT_COMPOUND_INTERSECT_ALL")
+ '("except" "GDA_SQL_STATEMENT_COMPOUND_EXCEPT")
+ '("except-all" "GDA_SQL_STATEMENT_COMPOUND_EXCEPT_ALL")
+ )
+)
+
+(define-enum SqlErrorType
+ (in-module "Gda")
+ (c-name "GdaSqlErrorType")
+ (gtype-id "GDA_TYPE_SQL_ERROR_TYPE")
+ (values
+ '("structure-contents-error" "GDA_SQL_STRUCTURE_CONTENTS_ERROR")
+ '("malformed-identifier-error" "GDA_SQL_MALFORMED_IDENTIFIER_ERROR")
+ '("missing-identifier-error" "GDA_SQL_MISSING_IDENTIFIER_ERROR")
+ '("validation-error" "GDA_SQL_VALIDATION_ERROR")
+ )
+)
+
+(define-enum SqlStatementType
+ (in-module "Gda")
+ (c-name "GdaSqlStatementType")
+ (gtype-id "GDA_TYPE_SQL_STATEMENT_TYPE")
+ (values
+ '("select" "GDA_SQL_STATEMENT_SELECT")
+ '("insert" "GDA_SQL_STATEMENT_INSERT")
+ '("update" "GDA_SQL_STATEMENT_UPDATE")
+ '("delete" "GDA_SQL_STATEMENT_DELETE")
+ '("compound" "GDA_SQL_STATEMENT_COMPOUND")
+ '("begin" "GDA_SQL_STATEMENT_BEGIN")
+ '("rollback" "GDA_SQL_STATEMENT_ROLLBACK")
+ '("commit" "GDA_SQL_STATEMENT_COMMIT")
+ '("savepoint" "GDA_SQL_STATEMENT_SAVEPOINT")
+ '("rollback-savepoint" "GDA_SQL_STATEMENT_ROLLBACK_SAVEPOINT")
+ '("delete-savepoint" "GDA_SQL_STATEMENT_DELETE_SAVEPOINT")
+ '("unknown" "GDA_SQL_STATEMENT_UNKNOWN")
+ '("none" "GDA_SQL_STATEMENT_NONE")
+ )
+)
+
+(define-enum SqlAnyPartType
+ (in-module "Gda")
+ (c-name "GdaSqlAnyPartType")
+ (gtype-id "GDA_TYPE_SQL_ANY_PART_TYPE")
+ (values
+ '("stmt-select" "GDA_SQL_ANY_STMT_SELECT")
+ '("stmt-insert" "GDA_SQL_ANY_STMT_INSERT")
+ '("stmt-update" "GDA_SQL_ANY_STMT_UPDATE")
+ '("stmt-delete" "GDA_SQL_ANY_STMT_DELETE")
+ '("stmt-compound" "GDA_SQL_ANY_STMT_COMPOUND")
+ '("stmt-begin" "GDA_SQL_ANY_STMT_BEGIN")
+ '("stmt-rollback" "GDA_SQL_ANY_STMT_ROLLBACK")
+ '("stmt-commit" "GDA_SQL_ANY_STMT_COMMIT")
+ '("stmt-savepoint" "GDA_SQL_ANY_STMT_SAVEPOINT")
+ '("stmt-rollback-savepoint" "GDA_SQL_ANY_STMT_ROLLBACK_SAVEPOINT")
+ '("stmt-delete-savepoint" "GDA_SQL_ANY_STMT_DELETE_SAVEPOINT")
+ '("stmt-unknown" "GDA_SQL_ANY_STMT_UNKNOWN")
+ '("expr" "GDA_SQL_ANY_EXPR")
+ '("sql-field" "GDA_SQL_ANY_SQL_FIELD")
+ '("sql-table" "GDA_SQL_ANY_SQL_TABLE")
+ '("sql-function" "GDA_SQL_ANY_SQL_FUNCTION")
+ '("sql-operation" "GDA_SQL_ANY_SQL_OPERATION")
+ '("sql-case" "GDA_SQL_ANY_SQL_CASE")
+ '("sql-select-field" "GDA_SQL_ANY_SQL_SELECT_FIELD")
+ '("sql-select-target" "GDA_SQL_ANY_SQL_SELECT_TARGET")
+ '("sql-select-join" "GDA_SQL_ANY_SQL_SELECT_JOIN")
+ '("sql-select-from" "GDA_SQL_ANY_SQL_SELECT_FROM")
+ '("sql-select-order" "GDA_SQL_ANY_SQL_SELECT_ORDER")
+ )
+)
+
+(define-enum SqlOperatorType
+ (in-module "Gda")
+ (c-name "GdaSqlOperatorType")
+ (gtype-id "GDA_TYPE_SQL_OPERATOR_TYPE")
+ (values
+ '("and" "GDA_SQL_OPERATOR_TYPE_AND")
+ '("or" "GDA_SQL_OPERATOR_TYPE_OR")
+ '("eq" "GDA_SQL_OPERATOR_TYPE_EQ")
+ '("is" "GDA_SQL_OPERATOR_TYPE_IS")
+ '("like" "GDA_SQL_OPERATOR_TYPE_LIKE")
+ '("between" "GDA_SQL_OPERATOR_TYPE_BETWEEN")
+ '("gt" "GDA_SQL_OPERATOR_TYPE_GT")
+ '("lt" "GDA_SQL_OPERATOR_TYPE_LT")
+ '("geq" "GDA_SQL_OPERATOR_TYPE_GEQ")
+ '("leq" "GDA_SQL_OPERATOR_TYPE_LEQ")
+ '("diff" "GDA_SQL_OPERATOR_TYPE_DIFF")
+ '("regexp" "GDA_SQL_OPERATOR_TYPE_REGEXP")
+ '("regexp-ci" "GDA_SQL_OPERATOR_TYPE_REGEXP_CI")
+ '("not-regexp" "GDA_SQL_OPERATOR_TYPE_NOT_REGEXP")
+ '("not-regexp-ci" "GDA_SQL_OPERATOR_TYPE_NOT_REGEXP_CI")
+ '("similar" "GDA_SQL_OPERATOR_TYPE_SIMILAR")
+ '("isnull" "GDA_SQL_OPERATOR_TYPE_ISNULL")
+ '("isnotnull" "GDA_SQL_OPERATOR_TYPE_ISNOTNULL")
+ '("not" "GDA_SQL_OPERATOR_TYPE_NOT")
+ '("in" "GDA_SQL_OPERATOR_TYPE_IN")
+ '("notin" "GDA_SQL_OPERATOR_TYPE_NOTIN")
+ '("concat" "GDA_SQL_OPERATOR_TYPE_CONCAT")
+ '("plus" "GDA_SQL_OPERATOR_TYPE_PLUS")
+ '("minus" "GDA_SQL_OPERATOR_TYPE_MINUS")
+ '("star" "GDA_SQL_OPERATOR_TYPE_STAR")
+ '("div" "GDA_SQL_OPERATOR_TYPE_DIV")
+ '("rem" "GDA_SQL_OPERATOR_TYPE_REM")
+ '("bitand" "GDA_SQL_OPERATOR_TYPE_BITAND")
+ '("bitor" "GDA_SQL_OPERATOR_TYPE_BITOR")
+ '("bitnot" "GDA_SQL_OPERATOR_TYPE_BITNOT")
+ )
+)
+
+(define-enum SqlSelectJoinType
+ (in-module "Gda")
+ (c-name "GdaSqlSelectJoinType")
+ (gtype-id "GDA_TYPE_SQL_SELECT_JOIN_TYPE")
+ (values
+ '("cross" "GDA_SQL_SELECT_JOIN_CROSS")
+ '("natural" "GDA_SQL_SELECT_JOIN_NATURAL")
+ '("inner" "GDA_SQL_SELECT_JOIN_INNER")
+ '("left" "GDA_SQL_SELECT_JOIN_LEFT")
+ '("right" "GDA_SQL_SELECT_JOIN_RIGHT")
+ '("full" "GDA_SQL_SELECT_JOIN_FULL")
+ )
+)
+
+
+;; From gda-sql-parser.h
+
+(define-function gda_sql_parser_get_type
+ (c-name "gda_sql_parser_get_type")
+ (return-type "GType")
+)
+
+(define-function gda_sql_parser_new
+ (c-name "gda_sql_parser_new")
+ (is-constructor-of "GdaSqlParser")
+ (return-type "GdaSqlParser*")
+)
+
+(define-method parse_string
+ (of-object "GdaSqlParser")
+ (c-name "gda_sql_parser_parse_string")
+ (return-type "GdaStatement*")
+ (parameters
+ '("const-gchar*" "sql")
+ '("const-gchar**" "remain")
+ '("GError**" "error")
+ )
+)
+
+(define-method parse_string_as_batch
+ (of-object "GdaSqlParser")
+ (c-name "gda_sql_parser_parse_string_as_batch")
+ (return-type "GdaBatch*")
+ (parameters
+ '("const-gchar*" "sql")
+ '("const-gchar**" "remain")
+ '("GError**" "error")
+ )
+)
+
+(define-method parse_file_as_batch
+ (of-object "GdaSqlParser")
+ (c-name "gda_sql_parser_parse_file_as_batch")
+ (return-type "GdaBatch*")
+ (parameters
+ '("const-gchar*" "filename")
+ '("GError**" "error")
+ )
+)
+
+(define-method set_syntax_error
+ (of-object "GdaSqlParser")
+ (c-name "gda_sql_parser_set_syntax_error")
+ (return-type "none")
+)
+
+(define-method set_overflow_error
+ (of-object "GdaSqlParser")
+ (c-name "gda_sql_parser_set_overflow_error")
+ (return-type "none")
+)
+
+
+
+;; From gda-sql-statement.h
+
+
+
+;; From gda-statement-struct-compound.h
+
+(define-function gda_sql_statement_compound_copy
+ (c-name "gda_sql_statement_compound_copy")
+ (return-type "gpointer")
+ (parameters
+ '("gpointer" "src")
+ )
+)
+
+(define-function gda_sql_statement_compound_free
+ (c-name "gda_sql_statement_compound_free")
+ (return-type "none")
+ (parameters
+ '("gpointer" "stmt")
+ )
+)
+
+(define-function gda_sql_statement_compound_serialize
+ (c-name "gda_sql_statement_compound_serialize")
+ (return-type "gchar*")
+ (parameters
+ '("gpointer" "stmt")
+ )
+)
+
+(define-function gda_sql_statement_compound_get_infos
+ (c-name "gda_sql_statement_compound_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-method get_n_cols
+ (of-object "GdaSqlStatementCompound")
+ (c-name "gda_sql_statement_compound_get_n_cols")
+ (return-type "gint")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method compound_set_type
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_compound_set_type")
+ (return-type "none")
+ (parameters
+ '("GdaSqlStatementCompoundType" "type")
+ )
+)
+
+(define-method compound_take_stmt
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_compound_take_stmt")
+ (return-type "none")
+ (parameters
+ '("GdaSqlStatement*" "s")
+ )
+)
+
+(define-function gda_sql_statement_compound_reduce
+ (c-name "gda_sql_statement_compound_reduce")
+ (return-type "GdaSqlAnyPart*")
+ (parameters
+ '("GdaSqlAnyPart*" "compound_or_select")
+ )
+)
+
+
+
+;; From gda-statement-struct-decl.h
+
+(define-method foreach
+ (of-object "GdaSqlAnyPart")
+ (c-name "gda_sql_any_part_foreach")
+ (return-type "gboolean")
+ (parameters
+ '("GdaSqlForeachFunc" "func")
+ '("gpointer" "data")
+ '("GError**" "error")
+ )
+)
+
+(define-method check_structure
+ (of-object "GdaSqlAnyPart")
+ (c-name "gda_sql_any_part_check_structure")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+
+
+;; From gda-statement-struct-delete.h
+
+(define-function gda_sql_statement_delete_get_infos
+ (c-name "gda_sql_statement_delete_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-method delete_take_table_name
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_delete_take_table_name")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method delete_take_condition
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_delete_take_condition")
+ (return-type "none")
+ (parameters
+ '("GdaSqlExpr*" "cond")
+ )
+)
+
+
+
+;; From gda-statement-struct.h
+
+(define-function gda_sql_statement_new
+ (c-name "gda_sql_statement_new")
+ (is-constructor-of "GdaSqlStatement")
+ (return-type "GdaSqlStatement*")
+ (parameters
+ '("GdaSqlStatementType" "type")
+ )
+)
+
+(define-method copy
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_copy")
+ (return-type "GdaSqlStatement*")
+)
+
+(define-method free
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_free")
+ (return-type "none")
+)
+
+(define-method serialize
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_serialize")
+ (return-type "gchar*")
+)
+
+(define-method to_string
+ (of-object "GdaSqlStatementType")
+ (c-name "gda_sql_statement_type_to_string")
+ (return-type "const-gchar*")
+)
+
+(define-function gda_sql_statement_string_to_type
+ (c-name "gda_sql_statement_string_to_type")
+ (return-type "GdaSqlStatementType")
+ (parameters
+ '("const-gchar*" "type")
+ )
+)
+
+(define-method check_structure
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_check_structure")
+ (return-type "gboolean")
+ (parameters
+ '("GError**" "error")
+ )
+)
+
+(define-method check_validity
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_check_validity")
+ (return-type "gboolean")
+ (parameters
+ '("GdaConnection*" "cnc")
+ '("GError**" "error")
+ )
+)
+
+(define-method check_clean
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_check_clean")
+ (return-type "none")
+)
+
+(define-method normalize
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_normalize")
+ (return-type "gboolean")
+ (parameters
+ '("GdaConnection*" "cnc")
+ '("GError**" "error")
+ )
+)
+
+(define-function gda_sql_statement_get_contents_infos
+ (c-name "gda_sql_statement_get_contents_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+ (parameters
+ '("GdaSqlStatementType" "type")
+ )
+)
+
+
+
+;; From gda-statement-struct-insert.h
+
+(define-function gda_sql_statement_insert_get_infos
+ (c-name "gda_sql_statement_insert_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-method insert_take_table_name
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_insert_take_table_name")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method insert_take_on_conflict
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_insert_take_on_conflict")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method insert_take_fields_list
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_insert_take_fields_list")
+ (return-type "none")
+ (parameters
+ '("GSList*" "list")
+ )
+)
+
+(define-method insert_take_1_values_list
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_insert_take_1_values_list")
+ (return-type "none")
+ (parameters
+ '("GSList*" "list")
+ )
+)
+
+(define-method insert_take_extra_values_list
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_insert_take_extra_values_list")
+ (return-type "none")
+ (parameters
+ '("GSList*" "list")
+ )
+)
+
+(define-method insert_take_select
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_insert_take_select")
+ (return-type "none")
+ (parameters
+ '("GdaSqlStatement*" "select")
+ )
+)
+
+
+
+;; From gda-statement-struct-parts.h
+
+(define-function gda_sql_expr_new
+ (c-name "gda_sql_expr_new")
+ (is-constructor-of "GdaSqlExpr")
+ (return-type "GdaSqlExpr*")
+ (parameters
+ '("GdaSqlAnyPart*" "parent")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlExpr")
+ (c-name "gda_sql_expr_free")
+ (return-type "none")
+)
+
+(define-method copy
+ (of-object "GdaSqlExpr")
+ (c-name "gda_sql_expr_copy")
+ (return-type "GdaSqlExpr*")
+)
+
+(define-method serialize
+ (of-object "GdaSqlExpr")
+ (c-name "gda_sql_expr_serialize")
+ (return-type "gchar*")
+)
+
+(define-method check_clean
+ (of-object "GdaSqlExpr")
+ (c-name "gda_sql_expr_check_clean")
+ (return-type "none")
+)
+
+(define-method take_select
+ (of-object "GdaSqlExpr")
+ (c-name "gda_sql_expr_take_select")
+ (return-type "none")
+ (parameters
+ '("GdaSqlStatement*" "stmt")
+ )
+)
+
+(define-function gda_sql_field_new
+ (c-name "gda_sql_field_new")
+ (is-constructor-of "GdaSqlField")
+ (return-type "GdaSqlField*")
+ (parameters
+ '("GdaSqlAnyPart*" "parent")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlField")
+ (c-name "gda_sql_field_free")
+ (return-type "none")
+)
+
+(define-method copy
+ (of-object "GdaSqlField")
+ (c-name "gda_sql_field_copy")
+ (return-type "GdaSqlField*")
+)
+
+(define-method serialize
+ (of-object "GdaSqlField")
+ (c-name "gda_sql_field_serialize")
+ (return-type "gchar*")
+)
+
+(define-method check_clean
+ (of-object "GdaSqlField")
+ (c-name "gda_sql_field_check_clean")
+ (return-type "none")
+)
+
+(define-method take_name
+ (of-object "GdaSqlField")
+ (c-name "gda_sql_field_take_name")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-function gda_sql_table_new
+ (c-name "gda_sql_table_new")
+ (is-constructor-of "GdaSqlTable")
+ (return-type "GdaSqlTable*")
+ (parameters
+ '("GdaSqlAnyPart*" "parent")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlTable")
+ (c-name "gda_sql_table_free")
+ (return-type "none")
+)
+
+(define-method copy
+ (of-object "GdaSqlTable")
+ (c-name "gda_sql_table_copy")
+ (return-type "GdaSqlTable*")
+)
+
+(define-method serialize
+ (of-object "GdaSqlTable")
+ (c-name "gda_sql_table_serialize")
+ (return-type "gchar*")
+)
+
+(define-method check_clean
+ (of-object "GdaSqlTable")
+ (c-name "gda_sql_table_check_clean")
+ (return-type "none")
+)
+
+(define-method take_name
+ (of-object "GdaSqlTable")
+ (c-name "gda_sql_table_take_name")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-function gda_sql_function_new
+ (c-name "gda_sql_function_new")
+ (is-constructor-of "GdaSqlFunction")
+ (return-type "GdaSqlFunction*")
+ (parameters
+ '("GdaSqlAnyPart*" "parent")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlFunction")
+ (c-name "gda_sql_function_free")
+ (return-type "none")
+)
+
+(define-method copy
+ (of-object "GdaSqlFunction")
+ (c-name "gda_sql_function_copy")
+ (return-type "GdaSqlFunction*")
+)
+
+(define-method serialize
+ (of-object "GdaSqlFunction")
+ (c-name "gda_sql_function_serialize")
+ (return-type "gchar*")
+)
+
+(define-method check_clean
+ (of-object "GdaSqlFunction")
+ (c-name "gda_sql_function_check_clean")
+ (return-type "none")
+)
+
+(define-method take_name
+ (of-object "GdaSqlFunction")
+ (c-name "gda_sql_function_take_name")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method take_args_list
+ (of-object "GdaSqlFunction")
+ (c-name "gda_sql_function_take_args_list")
+ (return-type "none")
+ (parameters
+ '("GSList*" "args")
+ )
+)
+
+(define-function gda_sql_operation_new
+ (c-name "gda_sql_operation_new")
+ (is-constructor-of "GdaSqlOperation")
+ (return-type "GdaSqlOperation*")
+ (parameters
+ '("GdaSqlAnyPart*" "parent")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlOperation")
+ (c-name "gda_sql_operation_free")
+ (return-type "none")
+)
+
+(define-method copy
+ (of-object "GdaSqlOperation")
+ (c-name "gda_sql_operation_copy")
+ (return-type "GdaSqlOperation*")
+)
+
+(define-method serialize
+ (of-object "GdaSqlOperation")
+ (c-name "gda_sql_operation_serialize")
+ (return-type "gchar*")
+)
+
+(define-function gda_sql_operation_operator_to_string
+ (c-name "gda_sql_operation_operator_to_string")
+ (return-type "const-gchar*")
+ (parameters
+ '("GdaSqlOperatorType" "op")
+ )
+)
+
+(define-function gda_sql_operation_operator_from_string
+ (c-name "gda_sql_operation_operator_from_string")
+ (return-type "GdaSqlOperatorType")
+ (parameters
+ '("const-gchar*" "op")
+ )
+)
+
+(define-function gda_sql_case_new
+ (c-name "gda_sql_case_new")
+ (is-constructor-of "GdaSqlCase")
+ (return-type "GdaSqlCase*")
+ (parameters
+ '("GdaSqlAnyPart*" "parent")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlCase")
+ (c-name "gda_sql_case_free")
+ (return-type "none")
+)
+
+(define-method copy
+ (of-object "GdaSqlCase")
+ (c-name "gda_sql_case_copy")
+ (return-type "GdaSqlCase*")
+)
+
+(define-method serialize
+ (of-object "GdaSqlCase")
+ (c-name "gda_sql_case_serialize")
+ (return-type "gchar*")
+)
+
+(define-function gda_sql_select_field_new
+ (c-name "gda_sql_select_field_new")
+ (is-constructor-of "GdaSqlSelectField")
+ (return-type "GdaSqlSelectField*")
+ (parameters
+ '("GdaSqlAnyPart*" "parent")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlSelectField")
+ (c-name "gda_sql_select_field_free")
+ (return-type "none")
+)
+
+(define-method copy
+ (of-object "GdaSqlSelectField")
+ (c-name "gda_sql_select_field_copy")
+ (return-type "GdaSqlSelectField*")
+)
+
+(define-method serialize
+ (of-object "GdaSqlSelectField")
+ (c-name "gda_sql_select_field_serialize")
+ (return-type "gchar*")
+)
+
+(define-method check_clean
+ (of-object "GdaSqlSelectField")
+ (c-name "gda_sql_select_field_check_clean")
+ (return-type "none")
+)
+
+(define-method take_star_value
+ (of-object "GdaSqlSelectField")
+ (c-name "gda_sql_select_field_take_star_value")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method take_expr
+ (of-object "GdaSqlSelectField")
+ (c-name "gda_sql_select_field_take_expr")
+ (return-type "none")
+ (parameters
+ '("GdaSqlExpr*" "expr")
+ )
+)
+
+(define-method take_alias
+ (of-object "GdaSqlSelectField")
+ (c-name "gda_sql_select_field_take_alias")
+ (return-type "none")
+ (parameters
+ '("GValue*" "alias")
+ )
+)
+
+(define-function gda_sql_select_target_new
+ (c-name "gda_sql_select_target_new")
+ (is-constructor-of "GdaSqlSelectTarget")
+ (return-type "GdaSqlSelectTarget*")
+ (parameters
+ '("GdaSqlAnyPart*" "parent")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlSelectTarget")
+ (c-name "gda_sql_select_target_free")
+ (return-type "none")
+)
+
+(define-method copy
+ (of-object "GdaSqlSelectTarget")
+ (c-name "gda_sql_select_target_copy")
+ (return-type "GdaSqlSelectTarget*")
+)
+
+(define-method serialize
+ (of-object "GdaSqlSelectTarget")
+ (c-name "gda_sql_select_target_serialize")
+ (return-type "gchar*")
+)
+
+(define-method check_clean
+ (of-object "GdaSqlSelectTarget")
+ (c-name "gda_sql_select_target_check_clean")
+ (return-type "none")
+)
+
+(define-method take_table_name
+ (of-object "GdaSqlSelectTarget")
+ (c-name "gda_sql_select_target_take_table_name")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method take_select
+ (of-object "GdaSqlSelectTarget")
+ (c-name "gda_sql_select_target_take_select")
+ (return-type "none")
+ (parameters
+ '("GdaSqlStatement*" "stmt")
+ )
+)
+
+(define-method take_alias
+ (of-object "GdaSqlSelectTarget")
+ (c-name "gda_sql_select_target_take_alias")
+ (return-type "none")
+ (parameters
+ '("GValue*" "alias")
+ )
+)
+
+(define-function gda_sql_select_join_new
+ (c-name "gda_sql_select_join_new")
+ (is-constructor-of "GdaSqlSelectJoin")
+ (return-type "GdaSqlSelectJoin*")
+ (parameters
+ '("GdaSqlAnyPart*" "parent")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlSelectJoin")
+ (c-name "gda_sql_select_join_free")
+ (return-type "none")
+)
+
+(define-method copy
+ (of-object "GdaSqlSelectJoin")
+ (c-name "gda_sql_select_join_copy")
+ (return-type "GdaSqlSelectJoin*")
+)
+
+(define-method serialize
+ (of-object "GdaSqlSelectJoin")
+ (c-name "gda_sql_select_join_serialize")
+ (return-type "gchar*")
+)
+
+(define-method to_string
+ (of-object "GdaSqlSelectJoinType")
+ (c-name "gda_sql_select_join_type_to_string")
+ (return-type "const-gchar*")
+)
+
+(define-function gda_sql_select_from_new
+ (c-name "gda_sql_select_from_new")
+ (is-constructor-of "GdaSqlSelectFrom")
+ (return-type "GdaSqlSelectFrom*")
+ (parameters
+ '("GdaSqlAnyPart*" "parent")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlSelectFrom")
+ (c-name "gda_sql_select_from_free")
+ (return-type "none")
+)
+
+(define-method copy
+ (of-object "GdaSqlSelectFrom")
+ (c-name "gda_sql_select_from_copy")
+ (return-type "GdaSqlSelectFrom*")
+)
+
+(define-method serialize
+ (of-object "GdaSqlSelectFrom")
+ (c-name "gda_sql_select_from_serialize")
+ (return-type "gchar*")
+)
+
+(define-method take_new_target
+ (of-object "GdaSqlSelectFrom")
+ (c-name "gda_sql_select_from_take_new_target")
+ (return-type "none")
+ (parameters
+ '("GdaSqlSelectTarget*" "target")
+ )
+)
+
+(define-method take_new_join
+ (of-object "GdaSqlSelectFrom")
+ (c-name "gda_sql_select_from_take_new_join")
+ (return-type "none")
+ (parameters
+ '("GdaSqlSelectJoin*" "join")
+ )
+)
+
+(define-function gda_sql_select_order_new
+ (c-name "gda_sql_select_order_new")
+ (is-constructor-of "GdaSqlSelectOrder")
+ (return-type "GdaSqlSelectOrder*")
+ (parameters
+ '("GdaSqlAnyPart*" "parent")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlSelectOrder")
+ (c-name "gda_sql_select_order_free")
+ (return-type "none")
+)
+
+(define-method copy
+ (of-object "GdaSqlSelectOrder")
+ (c-name "gda_sql_select_order_copy")
+ (return-type "GdaSqlSelectOrder*")
+)
+
+(define-method serialize
+ (of-object "GdaSqlSelectOrder")
+ (c-name "gda_sql_select_order_serialize")
+ (return-type "gchar*")
+)
+
+
+
+;; From gda-statement-struct-pspec.h
+
+(define-function gda_sql_param_spec_new
+ (c-name "gda_sql_param_spec_new")
+ (is-constructor-of "GdaSqlParamSpec")
+ (return-type "GdaSqlParamSpec*")
+ (parameters
+ '("GValue*" "simple_spec")
+ )
+)
+
+(define-method copy
+ (of-object "GdaSqlParamSpec")
+ (c-name "gda_sql_param_spec_copy")
+ (return-type "GdaSqlParamSpec*")
+)
+
+(define-method take_name
+ (of-object "GdaSqlParamSpec")
+ (c-name "gda_sql_param_spec_take_name")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method take_type
+ (of-object "GdaSqlParamSpec")
+ (c-name "gda_sql_param_spec_take_type")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method take_descr
+ (of-object "GdaSqlParamSpec")
+ (c-name "gda_sql_param_spec_take_descr")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method take_nullok
+ (of-object "GdaSqlParamSpec")
+ (c-name "gda_sql_param_spec_take_nullok")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method free
+ (of-object "GdaSqlParamSpec")
+ (c-name "gda_sql_param_spec_free")
+ (return-type "none")
+)
+
+(define-method serialize
+ (of-object "GdaSqlParamSpec")
+ (c-name "gda_sql_param_spec_serialize")
+ (return-type "gchar*")
+)
+
+
+
+;; From gda-statement-struct-select.h
+
+(define-function gda_sql_statement_select_new
+ (c-name "gda_sql_statement_select_new")
+ (return-type "gpointer")
+)
+
+(define-function gda_sql_statement_select_copy
+ (c-name "gda_sql_statement_select_copy")
+ (return-type "gpointer")
+ (parameters
+ '("gpointer" "src")
+ )
+)
+
+(define-function gda_sql_statement_select_free
+ (c-name "gda_sql_statement_select_free")
+ (return-type "none")
+ (parameters
+ '("gpointer" "stmt")
+ )
+)
+
+(define-function gda_sql_statement_select_serialize
+ (c-name "gda_sql_statement_select_serialize")
+ (return-type "gchar*")
+ (parameters
+ '("gpointer" "stmt")
+ )
+)
+
+(define-function gda_sql_statement_select_get_infos
+ (c-name "gda_sql_statement_select_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-method select_take_distinct
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_select_take_distinct")
+ (return-type "none")
+ (parameters
+ '("gboolean" "distinct")
+ '("GdaSqlExpr*" "distinct_expr")
+ )
+)
+
+(define-method select_take_expr_list
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_select_take_expr_list")
+ (return-type "none")
+ (parameters
+ '("GSList*" "expr_list")
+ )
+)
+
+(define-method select_take_from
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_select_take_from")
+ (return-type "none")
+ (parameters
+ '("GdaSqlSelectFrom*" "from")
+ )
+)
+
+(define-method select_take_where_cond
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_select_take_where_cond")
+ (return-type "none")
+ (parameters
+ '("GdaSqlExpr*" "expr")
+ )
+)
+
+(define-method select_take_group_by
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_select_take_group_by")
+ (return-type "none")
+ (parameters
+ '("GSList*" "group_by")
+ )
+)
+
+(define-method select_take_having_cond
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_select_take_having_cond")
+ (return-type "none")
+ (parameters
+ '("GdaSqlExpr*" "expr")
+ )
+)
+
+(define-method select_take_order_by
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_select_take_order_by")
+ (return-type "none")
+ (parameters
+ '("GSList*" "order_by")
+ )
+)
+
+(define-method select_take_limits
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_select_take_limits")
+ (return-type "none")
+ (parameters
+ '("GdaSqlExpr*" "count")
+ '("GdaSqlExpr*" "offset")
+ )
+)
+
+
+
+;; From gda-statement-struct-trans.h
+
+(define-function gda_sql_statement_begin_get_infos
+ (c-name "gda_sql_statement_begin_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-function gda_sql_statement_commit_get_infos
+ (c-name "gda_sql_statement_commit_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-function gda_sql_statement_rollback_get_infos
+ (c-name "gda_sql_statement_rollback_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-function gda_sql_statement_savepoint_get_infos
+ (c-name "gda_sql_statement_savepoint_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-function gda_sql_statement_rollback_savepoint_get_infos
+ (c-name "gda_sql_statement_rollback_savepoint_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-function gda_sql_statement_delete_savepoint_get_infos
+ (c-name "gda_sql_statement_delete_savepoint_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-method trans_take_mode
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_trans_take_mode")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method trans_set_isol_level
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_trans_set_isol_level")
+ (return-type "none")
+ (parameters
+ '("GdaTransactionIsolation" "level")
+ )
+)
+
+(define-method trans_take_name
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_trans_take_name")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+
+
+;; From gda-statement-struct-unknown.h
+
+(define-function gda_sql_statement_unknown_get_infos
+ (c-name "gda_sql_statement_unknown_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-method unknown_take_expressions
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_unknown_take_expressions")
+ (return-type "none")
+ (parameters
+ '("GSList*" "expressions")
+ )
+)
+
+
+
+;; From gda-statement-struct-update.h
+
+(define-function gda_sql_statement_update_get_infos
+ (c-name "gda_sql_statement_update_get_infos")
+ (return-type "GdaSqlStatementContentsInfo*")
+)
+
+(define-method update_take_table_name
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_update_take_table_name")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method update_take_on_conflict
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_update_take_on_conflict")
+ (return-type "none")
+ (parameters
+ '("GValue*" "value")
+ )
+)
+
+(define-method update_take_condition
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_update_take_condition")
+ (return-type "none")
+ (parameters
+ '("GdaSqlExpr*" "cond")
+ )
+)
+
+(define-method update_take_set_value
+ (of-object "GdaSqlStatement")
+ (c-name "gda_sql_statement_update_take_set_value")
+ (return-type "none")
+ (parameters
+ '("GValue*" "fname")
+ '("GdaSqlExpr*" "expr")
+ )
+)
+
+
+
+;; From gda-statement-struct-util.h
+
+(define-function gda_sql_value_stringify
+ (c-name "gda_sql_value_stringify")
+ (return-type "gchar*")
+ (parameters
+ '("const-GValue*" "value")
+ )
+)
+
+
Modified: libgdamm/branches/libgdamm-4-0/libgda/src/libgda_signals.defs
==============================================================================
--- libgdamm/branches/libgdamm-4-0/libgda/src/libgda_signals.defs (original)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/libgda_signals.defs Wed May 28 14:46:45 2008
@@ -261,13 +261,13 @@
;; From GdaDataModel
-(define-signal changed
+(define-signal reset
(of-object "GdaDataModel")
(return-type "void")
(when "last")
)
-(define-signal reset
+(define-signal changed
(of-object "GdaDataModel")
(return-type "void")
(when "last")
@@ -983,4 +983,69 @@
(construct-only #t)
)
+;; From GdaSqlParser
+
+(define-property tokenizer-flavour
+ (of-object "GdaSqlParser")
+ (prop-type "GParamInt")
+ (docs "")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property mode
+ (of-object "GdaSqlParser")
+ (prop-type "GParamInt")
+ (docs "")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property line-error
+ (of-object "GdaSqlParser")
+ (prop-type "GParamInt")
+ (docs "")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property column-error
+ (of-object "GdaSqlParser")
+ (prop-type "GParamInt")
+ (docs "")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+;; From GdaStatement
+
+(define-signal reset
+ (of-object "GdaStatement")
+ (return-type "void")
+ (when "first")
+)
+
+(define-signal checked
+ (of-object "GdaStatement")
+ (return-type "void")
+ (when "first")
+ (parameters
+ '("GdaConnection*" "p0")
+ '("gboolean" "p1")
+ )
+)
+
+(define-property structure
+ (of-object "GdaStatement")
+ (prop-type "GParamPointer")
+ (docs "")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
Added: libgdamm/branches/libgdamm-4-0/libgda/src/metastore.ccg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/metastore.ccg Wed May 28 14:46:45 2008
@@ -0,0 +1,29 @@
+// -*- C++ -*- // this is for the .ccg, I realize gensig puts one in
+
+/* metastore.cc
+ *
+ * Copyright 2003 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgdamm/metastore.h>
+
+namespace Gnome
+{
+
+
+} /* namespace Gnome */
+
Added: libgdamm/branches/libgdamm-4-0/libgda/src/metastore.hg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/metastore.hg Wed May 28 14:46:45 2008
@@ -0,0 +1,61 @@
+// -*- C++ -*- // this is for the .hg, I realize gensig puts one in
+
+/* metastore.h
+ *
+ * Copyright 2006 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgdamm/connection.h>
+
+_DEFS(libgdamm,libgda)
+_PINCLUDE(libgdamm/private/object_p.h)
+
+namespace Gnome
+{
+
+namespace Gda
+{
+
+/** Container for several values
+ *
+ * @ingroup Connection
+ */
+class MetaStore : public Glib::Object
+{
+ _CLASS_GOBJECT(MetaStore, GdaMetaStore, GDA_META_STORE, Glib::Object, GObject)
+public:
+ _WRAP_CREATE()
+
+ _WRAP_METHOD(int get_version(), gda_meta_store_get_version)
+ //TODO: varargs: extract(), modify()
+
+ _WRAP_METHOD(bool modify_with_context (const Glib::RefPtr<MetaContext>& context, const Glib::RefPtr<DataModel>& new_data), gda_meta_store_modify_with_context, errthrow)
+ _WRAP_METHOD(Glib::RefPtr<MetaStruct> schema_get_structure(), gda_meta_store_schema_get_structure, errthrow)
+
+ //TODO get_atrribute_value()
+ _WRAP_METHOD(bool set_attribute_value(const Glib::ustring& att_name, const Glib::ustring& att_value), gda_meta_store_set_attribute_value, errthrow)
+ _WRAP_METHOD(bool schema_add_custom_object(const Glib::ustring& xml), gda_meta_store_schema_add_custom_object, errthrow)
+ _WRAP_METHOD(Glib::RefPtr<Connection> get_internal_connection(), gda_meta_store_get_internal_connection)
+
+ //TODO Properties
+
+ //TODO Signals
+};
+
+} // namespace Gda
+} // namespace Gnome
+
Added: libgdamm/branches/libgdamm-4-0/libgda/src/metastruct.ccg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/metastruct.ccg Wed May 28 14:46:45 2008
@@ -0,0 +1,29 @@
+// -*- C++ -*- // this is for the .ccg, I realize gensig puts one in
+
+/* metastruct.cc
+ *
+ * Copyright 2003 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgdamm/metastruct.h>
+
+namespace Gnome
+{
+
+
+} /* namespace Gnome */
+
Added: libgdamm/branches/libgdamm-4-0/libgda/src/metastruct.hg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/metastruct.hg Wed May 28 14:46:45 2008
@@ -0,0 +1,50 @@
+// -*- C++ -*- // this is for the .hg, I realize gensig puts one in
+
+/* metastore.h
+ *
+ * Copyright 2006 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgda/gda-meta-struct.h>
+
+_DEFS(libgdamm,libgda)
+_PINCLUDE(libgdamm/private/object_p.h)
+
+namespace Gnome
+{
+
+namespace Gda
+{
+
+_WRAP_ENUM(MetaStructFeature, GdaMetaStructFeature)
+
+/** Container for several values
+ *
+ * @ingroup Connection
+ */
+class MetaStruct : public Glib::Object
+{
+ _CLASS_GOBJECT(MetaStruct, GdaMetaStruct, GDA_META_STRUCT, Glib::Object, GObject)
+public:
+ _WRAP_CREATE(MetaStructFeature features)
+
+ // TODO
+};
+
+} // namespace Gda
+} // namespace Gnome
+
Added: libgdamm/branches/libgdamm-4-0/libgda/src/sqlparser.ccg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/sqlparser.ccg Wed May 28 14:46:45 2008
@@ -0,0 +1,81 @@
+// -*- C++ -*- // this is for the .ccg, I realize gensig puts one in
+
+/* sqlparser.cc
+ *
+ * Copyright 2003 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgdamm/sqlparser.h>
+#include <libgda/sql-parser/gda-sql-parser.h>
+
+namespace Gnome
+{
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<Statement> parse_string(const Glib::ustring& sql, Glib::ustring& remain)
+#else
+Glib::RefPtr<Statement> parse_string(const Glib::ustring& sql, Glib::ustring& remain, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ GError* gerror = 0;
+ gchar* c_remain = 0;
+ Glib::RefPtr<Statement> retvalue = Glib::wrap(gda_sql_parser_parse_string(gobj(), sql.c_str(), &c_remain, &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+ if(gerror)
+ ::Glib::Error::throw_exception(gerror);
+#else
+ if(gerror)
+ error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+ if (c_remain)
+ {
+ remain = c_remain;
+ g_free(c_remain);
+ }
+
+ return retvalue;
+}
+
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+Glib::RefPtr<Batch> parse_string_as_batch(const Glib::ustring& sql, Glib::ustring& remain)
+#else
+Glib::RefPtr<Batch> parse_string_as_batch(const Glib::ustring& sql, Glib::ustring& remain, std::auto_ptr<Glib::Error>& error)
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+{
+ GError* gerror = 0;
+ gchar* c_remain = 0;
+ Glib::RefPtr<Statement> retvalue = Glib::wrap(gda_sql_parser_parse_string(gobj(), sql.c_str(), &c_remain, &(gerror)));
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
+ if(gerror)
+ ::Glib::Error::throw_exception(gerror);
+#else
+ if(gerror)
+ error = ::Glib::Error::throw_exception(gerror);
+#endif //GLIBMM_EXCEPTIONS_ENABLED
+
+ if (c_remain)
+ {
+ remain = c_remain;
+ g_free(c_remain);
+ }
+
+ return retvalue;
+}
+
+} /* namespace Gnome */
+
Added: libgdamm/branches/libgdamm-4-0/libgda/src/sqlparser.hg
==============================================================================
--- (empty file)
+++ libgdamm/branches/libgdamm-4-0/libgda/src/sqlparser.hg Wed May 28 14:46:45 2008
@@ -0,0 +1,67 @@
+// -*- C++ -*- // this is for the .hg, I realize gensig puts one in
+
+/* set.h
+ *
+ * Copyright 2006 libgdamm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgdamm/batch.h>
+#include <libgdamm/statement.h>
+
+_DEFS(libgdamm,libgda)
+_PINCLUDE(libgdamm/private/object_p.h)
+
+namespace Gnome
+{
+
+namespace Gda
+{
+
+_WRAP_ENUM(SqlParserMode, GdaSqlParserMode)
+
+/** Container for several values
+ *
+ * @ingroup Connection
+ */
+class SqlParser : public Glib::Object
+{
+ _CLASS_GOBJECT(SqlParser, GdaSqlParser, GDA_SQL_PARSER, Glib::Object, GObject)
+public:
+ _WRAP_CREATE()
+
+ _WRAP_METHOD_DOCS_ONLY(gda_sql_parser_parse_string)
+ Glib::RefPtr<Statement> parse_string(const Glib::ustring& sql, Glib::ustring& remain);
+ _WRAP_METHOD_DOCS_ONLY(gda_sql_parser_parse_string_as_batch)
+ Glib::RefPtr<Batch> parse_string_as_batch(const Glib::ustring& sql, Glib::ustring& remain);
+
+ _WRAP_METHOD(Glib::RefPtr<Batch> parse_file_as_batch(const std::string& filename), gda_sql_parser_parse_file_as_batch, errthrow)
+
+ _IGNORE(gda_sql_parser_set_overflow_error, gda_sql_parser_set_syntax_error)
+
+ //TODO:
+#if 0
+ _WPAP_PROPERTY("column-error", int)
+ _WPAP_PROPERTY("line-error", int)
+ _WPAP_PROPERTY("mode", int)
+ _WPAP_PROPERTY("tokenizer-flavour", int)
+#endif
+
+};
+
+} // namespace Gda
+} // namespace Gnome
+
Modified: libgdamm/branches/libgdamm-4-0/tools/extra_defs_gen/generate_defs_gda.cc
==============================================================================
--- libgdamm/branches/libgdamm-4-0/tools/extra_defs_gen/generate_defs_gda.cc (original)
+++ libgdamm/branches/libgdamm-4-0/tools/extra_defs_gen/generate_defs_gda.cc Wed May 28 14:46:45 2008
@@ -21,6 +21,7 @@
#include "glibmm_generate_extra_defs/generate_extra_defs.h"
#include <libgda/libgda.h>
+#include <sql-parser/gda-sql-parser.h>
//#include <libgda/gda-server-recordset-model.h>
int main (int argc, char *argv[])
@@ -51,7 +52,9 @@
<< get_defs (GDA_TYPE_STATEMENT)
<< get_defs (GDA_TYPE_BATCH)
<< get_defs (GDA_TYPE_HOLDER)
- << get_defs (GDA_TYPE_SET)
+ << get_defs (GDA_TYPE_SET)
+ << get_defs (GDA_TYPE_SQL_PARSER)
+ << get_defs (GDA_TYPE_STATEMENT)
<< std::endl;
return 0;
}
Modified: libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4
==============================================================================
--- libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4 (original)
+++ libgdamm/branches/libgdamm-4-0/tools/m4/convert_libgdamm.m4 Wed May 28 14:46:45 2008
@@ -19,6 +19,8 @@
_CONVERSION(`GdaServerOperation*',`Glib::RefPtr<ServerOperation>',`Glib::wrap($3)')
_CONVERSION(`GdaDataHandler*',`Glib::RefPtr<DataHandler>',`Glib::wrap($3)')
_CONVERSION(`GdaSqlParser*',`Glib::RefPtr<SqlParser>',`Glib::wrap($3)')
+_CONVERSION(`GdaBatch*',`Glib::RefPtr<Batch>',`Glib::wrap($3)')
+_CONVERSION(`GdaMetaStruct*',`Glib::RefPtr<MetaStruct>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<DataModel>&', `GdaDataModel*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<DataHandler>&', `GdaDataHandler*', __CONVERT_REFPTR_TO_P)
@@ -32,6 +34,10 @@
_CONVERSION(`const Glib::RefPtr<Holder>&', `GdaHolder*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Set>&', `const GdaSet*', __CONVERT_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Set>&', `GdaSet*', __CONVERT_CONST_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<Batch>&', `GdaBatch*', __CONVERT_CONST_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<MetaStore>&', `GdaMetaStore*', __CONVERT_CONST_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<MetaContext>&', `GdaMetaContext*', __CONVERT_CONST_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<MetaStruct>&', `GdaMetaStruct*', __CONVERT_CONST_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<const Row>&', `const GdaRow*', `($3)->gobj()')
_CONVERSION(`const Glib::RefPtr<Row>&', `GdaRow*', `const_cast<GdaRow*>(($3)->gobj())')
@@ -92,6 +98,8 @@
_CONV_ENUM(Gda,ValueAttribute)
_CONV_ENUM(Gda,StatementModelUsage)
_CONV_ENUM(Gda,SqlStatementType)
+_CONV_ENUM(Gda,SqlParserMode)
+_CONV_ENUM(Gda,MetaStructFeature)
# Lists
_CONVERSION(`const Glib::ListHandle<Value>&',`GList*',`$3.data()')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]