Re: [gnome-db] GdaSqlBuiler: JOIN AS



On 21 May 2010 16:32, Murray Cumming <murrayc murrayc com> wrote:
> 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 + "\"") ) );

This is now corrected in git/master, and will be in 4.1.6.

Vivien


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