Top |
GdaRepetitiveStatementGdaRepetitiveStatement — Execute the same statement several times with different values |
The GdaRepetitiveStatement object allows one to specify a statement to be executed several times using different variables' values sets for each execution. Using the object has almost no interrest at all if the statement to be executed several times has no parameter.
Use the gda_connection_repetitive_statement_execute()
method to execute the repetitive statement.
GdaRepetitiveStatement *
gda_repetitive_statement_new (GdaStatement *stmt
);
Creates a new GdaRepetitiveStatement object which, when executed, will execute stmt
once for all
the values set which will have been defined using gda_repetitive_statement_append_set()
.
Use gda_connection_repetitive_statement_execute()
to actually execute it.
Since: 4.2
gboolean gda_repetitive_statement_get_template_set (GdaRepetitiveStatement *rstmt
,GdaSet **set
,GError **error
);
Gets a new GdaSet object with the parameters used by the template statement in the
rstmt
object.
Use this object with gda_repetitive_statement_append_set()
.
rstmt |
a GdaRepetitiveStatement object |
|
set |
a place to store the returned template set |
|
error |
a place to store error, or |
[allow-none] |
Since: 4.2
GSList *
gda_repetitive_statement_get_all_sets (GdaRepetitiveStatement *rstmt
);
Get all the values sets which will have been added using gda_repetitive_statement_append_set()
.
a new GSList of GdaSet objects (free with g_slist_free()
).
[transfer container][element-type GdaSet]
Since: 4.2
gboolean gda_repetitive_statement_append_set (GdaRepetitiveStatement *rstmt
,GdaSet *values
,gboolean make_copy
);
Specifies that rstmt
be executed one time with the values contained in values
.
A new GdaSet to be used as the values
argument can be obtained using
gda_repetitive_statement_get_template_set()
.
rstmt |
a GdaRepetitiveStatement object |
|
values |
a GdaSet object with the values to be used |
|
make_copy |
|
Since: 4.2