Re: [gnome-db] GdaSqlQuery: sub-queries


>>> It's possible using gda_sql_builder_select_add_target_id() with a
>>> minor correction I've made,
>>> see
>> Is it possible to do this in 4.0.x without GdaSqlBuilder?
> I'm sure it's possible if you just write the correct SQL. All
> GdaSqlBuilder does is help you to write the SQL.

There's no GdaSqlBuilder in 4.0.x, so I use GdaSql structures directly.

>> If not, can I just create SQL string and parse later?
> I don't understand this part.

stmt is built with GdaSqlStatement, GdaSqlExpr, GdaSqlOperation, etc.
So I assume I need to get sql string using
gda_connection_statement_to_sql, and add it, to manually created sql as
subquery. And then, parse it with  gda_sql_parser_parse_string to create
new statement which can be passed to connection's execute.

The latter is not nice, and I wonder if I could follow GdaSqlBuilder
implementation from 4.1.x to provide the same functionality in 4.0.x.
However, in such case I am bit blind cause I am not sure what should be
expression and what operation.


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