add_expr
Description:
Defines an expression in this which may be reused to build other parts of a statement.
The new expression will contain the value passed as the ... argument.
If type is G_TYPE_STRING then it is possible to customize how the value has to be interpreted by passing a specific
DataHandler object as dh. This feature is very rarely used and the
dh argument should generally be null.
Note that for composite types such as Numeric, Gdate,
Time, ... pointer to these structures are expected, they should no be passed by value. For
example:
GDate *date = g_date_new_dmy (27, G_DATE_MAY, 1972);
id = gda_sql_builder_add_expr (b, NULL, G_TYPE_DATE, date);
g_date_free (date);
id = gda_sql_builder_add_expr (b, NULL, G_TYPE_STRING, "my string");
id = gda_sql_builder_add_expr (b, NULL, G_TYPE_INT, 25);
will correspond in SQL to:
'05-27-1972'
'my string'
25
Parameters:
| this |
a SqlBuilder object |
| dh |
deprecated useless argument, just pass |
| type |
the GType of the following argument |
| ... |
value to set the expression to, of the type specified by |
Returns:
|
the ID of the new expression, or |