|  |  |  | GNOME Data Access 5 manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
| GdaServerOperation: individual nodesGdaServerOperation: individual nodes — Getting information about parts (nodes) composing a path | 
enum GdaServerOperationNodeType; enum GdaServerOperationNodeStatus; GdaServerOperationNode; GdaServerOperationNode * gda_server_operation_get_node_info (GdaServerOperation *op,const gchar *path_format,...); gchar ** gda_server_operation_get_root_nodes (GdaServerOperation *op); GdaServerOperationNodeType gda_server_operation_get_node_type (GdaServerOperation *op,const gchar *path,GdaServerOperationNodeStatus *status); gchar * gda_server_operation_get_node_parent (GdaServerOperation *op,const gchar *path); gchar * gda_server_operation_get_node_path_portion (GdaServerOperation *op,const gchar *path);
To each part of a path is associated a node (as a GdaServerOperationNode structure). For example the
"/TABLE_DEF_P/TABLE_NAME" path has two nodes, one associated to "/TABLE_DEF_P" and one to
"/TABLE_DEF_P/TABLE_NAME". For more information about the path's format, see the
gda_server_operation_set_value_at()'s documentation.
This API is designed to get information about all the nodes present in a GdaServerOperation object (refer to the
gda_server_operation_get_root_nodes() function) and about each node of a path, and allows inspection
of its contents. It is mainly reserved for database provider's implementations but can have its purpose
outside of this scope.
typedef enum {
	GDA_SERVER_OPERATION_NODE_PARAMLIST,
	GDA_SERVER_OPERATION_NODE_DATA_MODEL,
	GDA_SERVER_OPERATION_NODE_PARAM,
	GDA_SERVER_OPERATION_NODE_SEQUENCE,
	GDA_SERVER_OPERATION_NODE_SEQUENCE_ITEM,
	GDA_SERVER_OPERATION_NODE_DATA_MODEL_COLUMN,
	GDA_SERVER_OPERATION_NODE_UNKNOWN
} GdaServerOperationNodeType;
typedef enum {
	GDA_SERVER_OPERATION_STATUS_OPTIONAL,
	GDA_SERVER_OPERATION_STATUS_REQUIRED,
	GDA_SERVER_OPERATION_STATUS_UNKNOWN
} GdaServerOperationNodeStatus;
typedef struct {
	GdaServerOperationNodeType    type;
	GdaServerOperationNodeStatus  status;
	
	GdaSet                       *plist;
	GdaDataModel                 *model;
	GdaColumn                    *column;
	GdaHolder                    *param; 
	gpointer                      priv;
} GdaServerOperationNode;
GdaServerOperationNode * gda_server_operation_get_node_info (GdaServerOperation *op,const gchar *path_format,...);
Get information about the node identified by path. The returned GdaServerOperationNode structure can be 
copied but not modified; it may change or cease to exist if op changes
| 
 | a GdaServerOperation object | 
| 
 | a complete path to a node (starting with "/") as a format string, similar to g_strdup_printf()'s argument | 
| 
 | the arguments to insert into the format string | 
| Returns : | a GdaServerOperationNode structure, or NULLif the node was not found. [transfer none][allow-none] | 
gchar **            gda_server_operation_get_root_nodes (GdaServerOperation *op);
Get an array of strings containing the paths of nodes situated at the root of op.
| 
 | a GdaServerOperation object | 
| Returns : | a new array, which must be freed with g_strfreev(). [transfer full] | 
GdaServerOperationNodeType gda_server_operation_get_node_type (GdaServerOperation *op,const gchar *path,GdaServerOperationNodeStatus *status);
Convenience function to get the type of a node.
| 
 | a GdaServerOperation object | 
| 
 | a complete path to a node (starting with "/") | 
| 
 | a place to store the status of the node, or NULL. [allow-none] | 
| Returns : | the type of node, or GDA_SERVER_OPERATION_NODE_UNKNOWN if the node was not found | 
gchar * gda_server_operation_get_node_parent (GdaServerOperation *op,const gchar *path);
Get the complete path to the parent of the node defined by path
| 
 | a GdaServerOperation object | 
| 
 | a complete path to a node (starting with "/") | 
| Returns : | a new string or NULLif the node does not have any parent or does not exist. [transfer full] | 
gchar * gda_server_operation_get_node_path_portion (GdaServerOperation *op,const gchar *path);
Get the last part of path
| 
 | a GdaServerOperation object | 
| 
 | a complete path to a node (starting with "/") | 
| Returns : | a new string, or NULLif an error occurred. [transfer full] |