Re: [gnome-db] gda_sql_builder_select_order_by()

Vivien Malerba <[email protected]>
Newsgroups gmane.comp.gnome.db
Message-ID <[email protected]>
On 4 May 2010 17:00, Murray Cumming <[email protected]> wrote:
> On Tue, 2010-04-27 at 23:10 +0200, Vivien Malerba wrote:
>> On 27 April 2010 17:38, Murray Cumming <[email protected]> wrote:
>> > I'm trying to use gda_sql_builder_select_order_by()
>> > http://library.gnome.org/devel/libgda/unstable/GdaSqlBuilder.html#gda-sql-builder-select-order-by
>> > to do something like
>> >  SELECT sometable.somefield, someothertable.somefield FROM sometable
>> >  ... (some JOIN that I can't be bothered to think of)
>> >  ORDER BY sometable.somefield
>> >
>> > How can I get the id of "sometable.somefield" to give to
>> > gda_sql_builder_select_order_by()?
>> >
>> > gda_sql_builder_select_add_field() lets's me specify the table and the
>> > field,
>> > http://library.gnome.org/devel/libgda/unstable/GdaSqlBuilder.html#gda-sql-builder-select-add-field
>> > but that doesn't return the generated ID.
>>
>> I suppose then gda_sql_builder_select_add_field() could be made to
>> return the field ID.
>
> Yes, that's what I was thinking. The attached patch should do that, but
> please check that it makes sense.
>

Patch applied to git/master, Thanks!

Vivien
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.