Re: [gnome-db] SELECT DISTINCT with GdaSqlBuilder

Murray Cumming <[email protected]>
Newsgroups gmane.comp.gnome.db
Message-ID <1267311990.29113.3.camel@murrayc-x61>
On Sat, 2010-02-27 at 14:45 +0100, Vivien Malerba wrote:
> On 27 February 2010 12:37, Murray Cumming <[email protected]> wrote:
> > How can I use the DISTINCT keyword when creating a SELECT statement with
> > GdaSqlBuilder?
> >
> 
> You can't! It seems I forgot about that...
> Here is the API I propose for that:
> 
> void gda_sql_builder_select_set_distinct (GdaSqlBuilder *builder,
> gboolean distinct, guint expr_id)
> with the last field optionnal if @distinct is TRUE, and ignored if
> @distinct is FALSE

Thanks.

What would expr_id represent? The rest of the SQL statement?

> Also there is no API to set limits, so I propose:
> void gda_sql_builder_select_set_limit (GdaSqlBuilder *builder, guint
> limit_count_expr_id, guint limit_offest_expr_id)

Again, thanks, though I don't know what the two IDs would be.

> If it's OK with you I'll add those methods ASAP.



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