Re: [gnome-db] INSERT statement with binary data



On Fri, 2009-01-30 at 16:01 +0100, Vivien Malerba wrote:

[snip]
> Another (more efficient) solution is to directly create your own
> GdaSqlStatement parts and use them to build a complete GdaSqlStatement
> from which a GdaStatement object can be created and executed:
> basically you can manipulate GdaSqlStatement parts instead of string
> parts.
>
> So for example instead of generating SQL portions like "WHERE
> id=##theid::int", you can generate the corresponding GdaSqlStatement
> part to avoid the parsing, which you can combine with another part
> (here it would be the GdaSqlStatement part for example for "SELECT a,
> b, c FROM mytable").
[snip]

So, a "part" is a GdaSqlStatement, right?
http://library.gnome.org/devel/libgda/unstable/libgda-40-GdaSqlStatement.html

So, how would I create one for "WHERE id=1".

gda_sql_statement_new() seems to require me to choose whether it's a
select, update, or whatever. That's not so bad, though it seem odd if
it's for just a part. I can't see any GdaSqlSelect* that is for a
where_clause.

It would be nice if these objects used GObject. That would make their
memory management simpler.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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