libgdamm Reference Documentation |
Public Member Functions | |
guint | add_item_to_sequence (const std::string& item_path) |
bool | del_item_from_sequence (const std::string& item_path) |
Glib::ustring | get_node_parent (const Glib::ustring& path) const |
Get the complete path to the parent of the node defined by path. | |
Glib::ustring | get_node_path_portion (const Glib::ustring& path) const |
Get the last part of path. | |
ServerOperationNodeType | get_node_type (const Glib::ustring& path, ServerOperationNodeStatus& status) const |
Convenience function to get the type of a node. | |
ServerOperationType | get_op_type () const |
Get the type of operation op is for. | |
Glib::StringArrayHandle | get_root_nodes () const |
Get an array of strings containing the paths of nodes situated at the root of op. | |
Glib::StringArrayHandle | get_sequence_item_names (const Glib::ustring& path) const |
Fetch the contents of a sequence. | |
guint | get_sequence_max_size (const Glib::ustring& path) const |
guint | get_sequence_min_size (const Glib::ustring& path) const |
Glib::ustring | get_sequence_name (const std::string& path) const |
guint | get_sequence_size (const Glib::ustring& path) const |
Value | get_value_at (const Glib::ustring& path_format) const |
Get the value for the node at the path formed using path_format and . | |
const GdaServerOperation* | gobj () const |
Provides access to the underlying C GObject. | |
GdaServerOperation* | gobj () |
Provides access to the underlying C GObject. | |
GdaServerOperation* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
bool | is_valid (const std::string& xml_file) const |
Tells if all the required values in op have been defined. | |
bool | load_data_from_xml (xmlNodePtr node) |
Loads the contents of node into op. | |
bool | perform_create_database (const Glib::ustring& provider) |
bool | perform_drop_database (const Glib::ustring& provider) |
Glib::PropertyProxy_ReadOnly <Glib::RefPtr<Connection>> | property_connection () const |
Connection to use. | |
Glib::PropertyProxy_ReadOnly <gint> | property_op_type () const |
Type of operation to be done. | |
xmlNodePtr | save_data_to_xml () |
Creates a new xmlNodePtr tree which can be used to save the op object. | |
void | set_value_at (const Glib::ustring& path_format, const Glib::ustring& value) |
Set the value for the node at the path formed using path_format and @. | |
Glib::SignalProxy2< void, Glib::ustring, int > | signal_signal_sequence_item_added () |
Glib::SignalProxy2< void, Glib::ustring, int > | signal_signal_sequence_item_remove () |
virtual | ~ServerOperation () |
Static Public Member Functions | |
static Glib::RefPtr <ServerOperation> | prepare_create_database (const Glib::ustring& provider, const Glib::ustring& db_name) |
static Glib::RefPtr <ServerOperation> | prepare_drop_database (const Glib::ustring& provider, const Glib::ustring& db_name) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr <Gnome::Gda::ServerOperation> | wrap (GdaServerOperation* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
Basically this object is just a named data store: it can store named values, the values being organized hirarchically. A value can be read from its path (similar to a Unix file path) using the get_value_at() method.
virtual Gnome::Gda::ServerOperation::~ServerOperation | ( | ) | [virtual] |
guint Gnome::Gda::ServerOperation::add_item_to_sequence | ( | const std::string & | item_path | ) |
bool Gnome::Gda::ServerOperation::del_item_from_sequence | ( | const std::string & | item_path | ) |
Glib::ustring Gnome::Gda::ServerOperation::get_node_parent | ( | const Glib::ustring & | path | ) | const |
Get the complete path to the parent of the node defined by path.
path | A complete path to a node (starting with "/"). |
0
if the node does not have any parent or does not exist. Glib::ustring Gnome::Gda::ServerOperation::get_node_path_portion | ( | const Glib::ustring & | path | ) | const |
Get the last part of path.
path | A complete path to a node (starting with "/"). |
0
if an error occurred. ServerOperationNodeType Gnome::Gda::ServerOperation::get_node_type | ( | const Glib::ustring & | path, | |
ServerOperationNodeStatus& | status | |||
) | const |
Convenience function to get the type of a node.
path | A complete path to a node (starting with "/"). | |
status | A place to store the status of the node, or 0 . |
ServerOperationType Gnome::Gda::ServerOperation::get_op_type | ( | ) | const |
Get the type of operation op is for.
Glib::StringArrayHandle Gnome::Gda::ServerOperation::get_root_nodes | ( | ) | const |
Get an array of strings containing the paths of nodes situated at the root of op.
Glib::StringArrayHandle Gnome::Gda::ServerOperation::get_sequence_item_names | ( | const Glib::ustring & | path | ) | const |
Fetch the contents of a sequence.
path can describe either a sequence (for example "/SEQNAME") or an item in a sequence (for example "/SEQNAME/3")
path | A complete path to a sequence node (starting with "/"). |
guint Gnome::Gda::ServerOperation::get_sequence_max_size | ( | const Glib::ustring & | path | ) | const |
path | A complete path to a sequence node (starting with "/"). |
guint Gnome::Gda::ServerOperation::get_sequence_min_size | ( | const Glib::ustring & | path | ) | const |
path | A complete path to a sequence node (starting with "/"). |
Glib::ustring Gnome::Gda::ServerOperation::get_sequence_name | ( | const std::string & | path | ) | const |
path | A complete path to a sequence node (starting with "/"). |
guint Gnome::Gda::ServerOperation::get_sequence_size | ( | const Glib::ustring & | path | ) | const |
path | A complete path to a sequence node (starting with "/"). |
Value Gnome::Gda::ServerOperation::get_value_at | ( | const Glib::ustring & | path_format | ) | const |
Get the value for the node at the path formed using path_format and .
.. (the rules are the same as for Glib::strdup_printf())
path_format | A complete path to a node (starting with "/"). | |
Varargs | Arguments to use with path_format to make a complete path. |
0
if the value is undefined or if the path is not defined or path does not hold any value. const GdaServerOperation* Gnome::Gda::ServerOperation::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
GdaServerOperation* Gnome::Gda::ServerOperation::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
GdaServerOperation* Gnome::Gda::ServerOperation::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool Gnome::Gda::ServerOperation::is_valid | ( | const std::string & | xml_file | ) | const |
Tells if all the required values in op have been defined.
if xml_file is not 0
, the validity of op is tested against that specification, and not againts the current op's specification.
xml_file | An XML specification file (see new()). |
true
if op is valid. bool Gnome::Gda::ServerOperation::load_data_from_xml | ( | xmlNodePtr | node | ) |
Loads the contents of node into op.
The XML tree passed through the node argument must correspond to an XML tree saved using save_data_to_xml().
node | A xmlNodePtr. |
true
if no error occurred. bool Gnome::Gda::ServerOperation::perform_create_database | ( | const Glib::ustring & | provider | ) |
bool Gnome::Gda::ServerOperation::perform_drop_database | ( | const Glib::ustring & | provider | ) |
static Glib::RefPtr<ServerOperation> Gnome::Gda::ServerOperation::prepare_create_database | ( | const Glib::ustring & | provider, | |
const Glib::ustring & | db_name | |||
) | [static] |
static Glib::RefPtr<ServerOperation> Gnome::Gda::ServerOperation::prepare_drop_database | ( | const Glib::ustring & | provider, | |
const Glib::ustring & | db_name | |||
) | [static] |
Glib::PropertyProxy_ReadOnly<Glib::RefPtr<Connection>> Gnome::Gda::ServerOperation::property_connection | ( | ) | const |
Connection to use.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<gint> Gnome::Gda::ServerOperation::property_op_type | ( | ) | const |
Type of operation to be done.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
xmlNodePtr Gnome::Gda::ServerOperation::save_data_to_xml | ( | ) |
Creates a new xmlNodePtr tree which can be used to save the op object.
This XML structure can then be saved to disk if necessary. Use xmlFreeNode to free the associated memory when not needed anymore.
0
. void Gnome::Gda::ServerOperation::set_value_at | ( | const Glib::ustring & | path_format, | |
const Glib::ustring & | value | |||
) |
Set the value for the node at the path formed using path_format and @.
.. the rules are the same as for Glib::strdup_printf()).
Note that trying to set a value for a path which is not used by the current provider (such as "/TABLE_OPTIONS_P/TABLE_ENGINE" for a PostgreSQL connection), will not generate any error; this allows one to set all the possible parameters and use the same code for several providers.
Here are the possible formats of path_format: <itemizedlist> <listitem>If the path corresponds to a Gda::Holder, then the parameter is set to value</listitem> <listitem>If the path corresponds to a sequence item like for example "/SEQUENCE_NAME/5/NAME" for the "NAME" value of the 6th item of the "SEQUENCE_NAME" sequence then: <itemizedlist> <listitem>if the sequence already has 6 or more items, then the value is just set to the corresponding value in the 6th item of the sequence</listitem> <listitem>if the sequence has less then 6 items, then items are added up to the 6th one before setting the value to the corresponding in the 6th item of the sequence</listitem> </itemizedlist> </listitem> <listitem>If the path corresponds to a Gda::DataModel, like for example "/ARRAY/@ @a COLUMN/5" for the value at the 6th row of the "COLUMN" column of the "ARRAY" data model, then: <itemizedlist> <listitem>if the data model already contains 6 or more rows, then the value is just set</listitem> <listitem>if the data model has less than 6 rows, then rows are added up to the 6th one before setting the value</listitem> </itemizedlist> </listitem> </itemizedlist>
value | A string. | |
path_format | A complete path to a node (starting with "/"). | |
Varargs | Arguments to use with path_format to make a complete path. |
true
if no error occurred. Glib::SignalProxy2< void,Glib::ustring,int > Gnome::Gda::ServerOperation::signal_signal_sequence_item_added | ( | ) |
void on_my_signal_sequence_item_added(Glib::ustring arg1, int arg2)
Glib::SignalProxy2< void,Glib::ustring,int > Gnome::Gda::ServerOperation::signal_signal_sequence_item_remove | ( | ) |
void on_my_signal_sequence_item_remove(Glib::ustring arg1, int arg2)
Glib::RefPtr<Gnome::Gda::ServerOperation> wrap | ( | GdaServerOperation * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |