Top |
GdaTreeMgrSelectGdaTreeMgrSelect — A tree manager which creates a node for each row resulting from the execution of a SELECT statement |
GdaConnection * | connection | Read / Write / Construct Only |
GdaSet * | params | Read / Write / Construct Only |
GdaStatement * | statement | Read / Write / Construct Only |
The GdaTreeMgrSelect is a GdaTreeManager object which executes a SELECT statement and creates a node for each row in the result.
The GdaConnection and SELECT GdaStatement to be used need to be specified when the object is created. If the SELECT statement to be used needs some parameters, then it is possible to give values to some of them when constructing the object, but not necessary.
If the SELECT statement needs some parameters which have not been provided during the construction, then
these parameters will be fetched from the GdaTreeNode below which the nodes will be placed (using
gda_tree_node_fetch_attribute()
).
For each node created, an attribute is set for each column in the SELECT statement: the attribute name is the column name and the attribute value is the value if that column.
GdaTreeManager * gda_tree_mgr_select_new (GdaConnection *cnc
,GdaStatement *stmt
,GdaSet *params
);
Creates a new GdaTreeMgrSelect object which will add one tree node for each row in
the GdaDataModel resulting from the execution of stmt
.
cnc |
a GdaConnection object |
|
stmt |
a GdaStatement object representing a SELECT statement |
|
params |
a GdaSet object representing fixed parameters which are to be used when executing |
Since: 4.2
“connection”
property“connection” GdaConnection *
Connection to use.
Owner: GdaTreeMgrSelect
Flags: Read / Write / Construct Only
“params”
property“params” GdaSet *
Parameters for the SELECT statement.
Owner: GdaTreeMgrSelect
Flags: Read / Write / Construct Only
“statement”
property“statement” GdaStatement *
SELECT statement.
Owner: GdaTreeMgrSelect
Flags: Read / Write / Construct Only