Top | ![]() |
![]() |
![]() |
![]() |
GdaRendererGdaRenderer — Interface to get representations of objects as SQL statements, XML nodes or human readable text |
gchar * | gda_renderer_render_as_sql () |
gchar * | gda_renderer_render_as_str () |
gboolean | gda_renderer_is_valid () |
GdaRenderer is implemented by GdaDictField, GdaQuery, GdaQueryCondition, GdaQueryFieldAgg, GdaQueryFieldAll, GdaQueryFieldField, GdaQueryFieldFunc, GdaQueryFieldValue and GdaQueryTarget.
gchar * gda_renderer_render_as_sql (GdaRenderer *iface
,GdaParameterList *context
,GSList **out_params_used
,GdaRendererOptions options
,GError **error
);
Build a SQL statement representing the object, in the specified context.
If context
is NULL
, then no error related to missing parameters (which should be in the
context) is returned, and missing values are replaced by 'human readable' SQL.
If out_params_used
is not NULL
, then pointers to the GdaParameter objects used to actually
render the SQL statement are appended to the list (in case a parameter object is used several times,
it is only once listed in the resulting list).
iface |
an object which implements the GdaRenderer interface |
|
context |
a GdaParameterList containing values for |
|
out_params_used |
a place to append GdaParameter which have been used during the rendering process, or |
|
options |
OR'ed flags from GdaRendererOptions to give some rendering options |
|
error |
location to store error, or |
gchar * gda_renderer_render_as_str (GdaRenderer *iface
,GdaParameterList *context
);
Build a human readable string representing the object, in the specified context.
gboolean gda_renderer_is_valid (GdaRenderer *iface
,GdaParameterList *context
,GError **error
);
Tells if iface
has all the necessary information in context
to be rendered
into a valid statement (which can be executed).
iface |
an object which implements the GdaRenderer interface |
|
context |
rendering context |
|
error |
location to store error, or |
The rendered statement will output easy to read SQL |
||
parameters will be rendered using the :param_name notation (the parameter is "encoded" using |
||
parameters will be rendered using the ?NNN notation where NNN is the prrameter index |
||
parameters will be rendered using the ?NNN notation where NNN is the prrameter index |