[libgdamm] SqlBuilder: Add select_add_target_id().



commit 0851bddc941da627774c4b12ddfd69aacf45e196
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed May 12 11:14:56 2010 +0200

    SqlBuilder: Add select_add_target_id().
    
    * libgda/src/sqlbuilder.[hg|ccg]: Added select_add_target_id(),
        which _might_ be useful for adding sub-queries as targets, though I
        am checking.

 ChangeLog                 |    8 ++++++++
 libgda/src/sqlbuilder.ccg |    4 ++++
 libgda/src/sqlbuilder.hg  |    5 ++++-
 3 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 290fccb..d47d618 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-05-12  Murray Cumming  <murrayc murrayc com>
+
+	SqlBuilder: Add select_add_target_id().
+
+	* libgda/src/sqlbuilder.[hg|ccg]: Added select_add_target_id(),
+    which _might_ be useful for adding sub-queries as targets, though I
+    am checking.
+
 2010-05-11  Murray Cumming  <murrayc murrayc com>
 
     SqlBuilder: Add add_sub_select().
diff --git a/libgda/src/sqlbuilder.ccg b/libgda/src/sqlbuilder.ccg
index e75b204..05e207c 100644
--- a/libgda/src/sqlbuilder.ccg
+++ b/libgda/src/sqlbuilder.ccg
@@ -95,6 +95,10 @@ guint SqlBuilder::select_add_target(const Glib::ustring& table_name, const Glib:
   return gda_sql_builder_select_add_target(gobj(), table_name.c_str(), string_or_null(alias.c_str()));
 }
 
+guint SqlBuilder::select_add_target_id(guint table_id, const Glib::ustring& alias)
+{
+  return gda_sql_builder_select_add_target_id(gobj(), 0, table_id, string_or_null(alias.c_str()));
+}
 
 guint SqlBuilder::select_join_targets(guint left_target_id, guint right_target_id, SqlSelectJoinType join_type, guint join_expr)
 {
diff --git a/libgda/src/sqlbuilder.hg b/libgda/src/sqlbuilder.hg
index d191694..f050a02 100644
--- a/libgda/src/sqlbuilder.hg
+++ b/libgda/src/sqlbuilder.hg
@@ -172,8 +172,11 @@ public:
    * @return The ID of the new target, or 0 if there was an error.
    */
   guint select_add_target(const Glib::ustring& table_name, const Glib::ustring& alias = Glib::ustring());
+  _IGNORE(gda_sql_builder_select_add_target)
 
-  _IGNORE(gda_sql_builder_select_add_target_id, gda_sql_builder_select_add_target)
+  //For instance, to add a sub-query?
+  guint select_add_target_id(guint table_id, const Glib::ustring& alias = Glib::ustring());
+  _IGNORE(gda_sql_builder_select_add_target_id)
 
   /** Joins two targets in a SELECT statement
    * @param left_target_id The ID of the left target to use (not %0)



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