Re: [gnome-db] GdaSqlBuiler: JOIN AS

Murray Cumming <[email protected]>
Newsgroups gmane.comp.gnome.db
Message-ID <1274452378.31258.11.camel@murrayc-desktop>
On Thu, 2010-05-20 at 13:48 +0200, Murray Cumming wrote:
> Yes, when I specify the alias in my call to
> gda_sql_builder_select_add_target() and then use the returned ID as
> the
> target (instead of the table) when calling
> gda_sql_builder_select_join_targets() then it works fine. 

However, I am now hitting this code in gda-sql-builder.c, 
in gda_sql_builder_select_join_targets():

	if (left_pos > right_pos) {
		TO_IMPLEMENT;
	}


I don't understand why that's an issue. It happens in this (C++) code:

const Glib::ustring alias_name = "examplealias";
const guint to_target_id = 
  builder->select_add_target(to_table, alias_name);

builder->select_join_targets(
  builder->select_add_target(m_relationship->get_from_table()),
  to_target_id,
  Gnome::Gda::SQL_SELECT_JOIN_LEFT,
  builder->add_cond(
    Gnome::Gda::SQL_OPERATOR_TYPE_EQ,
    builder->add_id("\"" + from_table + "\".\"" + from_field + "\""),
    builder->add_id("\"" + alias_name + "\".\"" + to_field + "\"") ) );




-- 
[email protected]
www.murrayc.com
www.openismus.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.