Gnome::Gda::ServerOperation Class Reference
Data definition (DDL) queries

Handles any DDL query in an abstract way. More...

Inheritance diagram for Gnome::Gda::ServerOperation:
[legend]
Collaboration diagram for Gnome::Gda::ServerOperation:
[legend]

## Public Member Functions

| ServerOperation (ServerOperation&& src) noexcept
ServerOperation& | operator= (ServerOperation&& src) noexcept
virtual | ~ServerOperation () noexcept
GdaServerOperation* | gobj ()
| Provides access to the underlying C GObject. More...
const GdaServerOperation* | gobj () const
| Provides access to the underlying C GObject. More...
GdaServerOperation* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
bool | perform_drop_database (const Glib::ustring& provider)
bool | perform_create_database (const Glib::ustring& provider)
Value | get_value_at (const Glib::ustring& path_format) const
| Get the value for the node at the path formed using path_format and ... More...
template<class ValueType >
void | set_value_at (const Glib::ustring& path_format, const ValueType& value)
void | set_value_at_as_value (const Glib::ustring& path_format, const Glib::ValueBase& value)
ServerOperationNodeType | get_node_type (const Glib::ustring& path, ServerOperationNodeStatus& status) const
| Convenience function to get the type of a node. More...
guint | get_sequence_size (const Glib::ustring& path) const
guint | get_sequence_max_size (const Glib::ustring& path) const
guint | get_sequence_min_size (const Glib::ustring& path) const
std::vector< Glib::ustring > | get_sequence_item_names (const Glib::ustring& path) const
| Fetch the contents of a sequence. More...
Glib::ustring | get_sequence_name (const std::string& path) const
bool | is_valid (const std::string& xml_file) const
| Tells if all the required values in op have been defined. More...
bool | load_data_from_xml (xmlNodePtr node)
| Loads the contents of node into op. More...
xmlNodePtr | save_data_to_xml ()
Glib::ustring | get_node_path_portion (const Glib::ustring& path) const
| Get the last part of path. More...
Glib::ustring | get_node_parent (const Glib::ustring& path) const
| Get the complete path to the parent of the node defined by path. More...
ServerOperationType | get_op_type () const
| Get the type of operation op is for. More...
bool | del_item_from_sequence (const std::string& item_path)
guint | add_item_to_sequence (const std::string& item_path)
std::vector< Glib::ustring > | get_root_nodes () const
| Get an array of strings containing the paths of nodes situated at the root of op. More...
Glib::SignalProxy2< void, Glib::ustring, int > | signal_signal_sequence_item_added ()
Glib::SignalProxy2< void, Glib::ustring, int > | signal_signal_sequence_item_remove ()
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Connection > > | property_connection () const
| Connection to use. More...
Glib::PropertyProxy_ReadOnly< gint > | property_op_type () const
| Type of operation to be done. More...
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable ()
| trackable (const trackable &src)
| trackable (trackable &&src) noexcept
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src) noexcept
void | remove_destroy_notify_callback (void *data) const

## Static Public Member Functions

static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
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. More...

## Additional Inherited Members

Public Types inherited from Glib::Object
typedef void(* | DestroyNotify) (gpointer data)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
virtual | ~Object () noexcept
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Detailed Description

Handles any DDL query in an abstract way.

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.

## Constructor & Destructor Documentation

Gnome::Gda::ServerOperation::ServerOperation | ( | ServerOperation&& | src | ) |

noexcept

virtual Gnome::Gda::ServerOperation::~ServerOperation | ( |  | ) |

virtual noexcept

## Member Function Documentation

guint Gnome::Gda::ServerOperation::add_item_to_sequence | ( | const std::string & | item_path | ) |

Parameters

  item_path | The path to the sequence to which an item must be added (like "/SEQ_NAME" for instance).

Returns
  The index of the new entry in the sequence (like 5 for example if a 6th item has been added to the sequence.

bool Gnome::Gda::ServerOperation::del_item_from_sequence | ( | const std::string & | item_path | ) |

Parameters

  item_path | The path to the sequence's item to remove (like "/SEQ_NAME/5" for instance).

Returns
  `true` if the specified node has been removed from the sequence.

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.

Parameters

  path | A complete path to a node (starting with "/").

Returns
  A new string or `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.

Parameters

  path | A complete path to a node (starting with "/").

Returns
  A new string, or `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.

Parameters

  path | A complete path to a node (starting with "/").
  status | A place to store the status of the node, or `0`.

Returns
  The type of node, or GDA_SERVER_OPERATION_NODE_UNKNOWN if the node was not found.

ServerOperationType Gnome::Gda::ServerOperation::get_op_type | ( |  | ) | const

Get the type of operation op is for.

Returns
  A Gda::ServerOperationType enum.

std::vector<Glib::ustring> Gnome::Gda::ServerOperation::get_root_nodes | ( |  | ) | const

Get an array of strings containing the paths of nodes situated at the root of op.

Returns
  A new array, which must be freed with Glib::strfreev().

std::vector<Glib::ustring> 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")

Parameters

  path | A complete path to a sequence node (starting with "/").

Returns
  A array of strings containing the complete paths of the nodes contained at path (free with Glib::strfreev()).

guint Gnome::Gda::ServerOperation::get_sequence_max_size | ( | const Glib::ustring & | path | ) | const

Parameters

  path | A complete path to a sequence node (starting with "/").

Returns
  The maximum number of items in the sequence at path, or 0 if path is not a sequence node.

guint Gnome::Gda::ServerOperation::get_sequence_min_size | ( | const Glib::ustring & | path | ) | const

Parameters

  path | A complete path to a sequence node (starting with "/").

Returns
  The minimum number of items in the sequence at path, or 0 if path is not a sequence node.

Glib::ustring Gnome::Gda::ServerOperation::get_sequence_name | ( | const std::string & | path | ) | const

Parameters

  path | A complete path to a sequence node (starting with "/").

Returns
  The name of the sequence at path.

guint Gnome::Gda::ServerOperation::get_sequence_size | ( | const Glib::ustring & | path | ) | const

Parameters

  path | A complete path to a sequence node (starting with "/").

Returns
  The number of items in the sequence at path, or 0 if path is not a sequence node.

static GType Gnome::Gda::ServerOperation::get_type | ( |  | ) |

static

Get the GType for this class, for use with the underlying GObject type system.

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())

Parameters

  path_format | A complete path to a node (starting with "/").
  Varargs | Arguments to use with path_format to make a complete path.

Returns
  A constant Value if a value has been defined, or `0` if the value is undefined or if the path is not defined or path does not hold any value.

GdaServerOperation* Gnome::Gda::ServerOperation::gobj | ( |  | ) |

inline

Provides access to the underlying C GObject.

const GdaServerOperation* Gnome::Gda::ServerOperation::gobj | ( |  | ) | const

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 against the current op's specification.

Parameters

  xml_file | An XML specification file (see new()).

Returns
  `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().

Parameters

  node | A #xmlNodePtr.

Returns
  `true` if no error occurred.

ServerOperation& Gnome::Gda::ServerOperation::operator= | ( | ServerOperation&& | src | ) |

noexcept

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.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< gint > Gnome::Gda::ServerOperation::property_op_type | ( |  | ) | const

Type of operation to be done.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

xmlNodePtr Gnome::Gda::ServerOperation::save_data_to_xml | ( |  | ) |

template <class ValueType >

void Gnome::Gda::ServerOperation::set_value_at | ( | const Glib::ustring & | path_format,
|  | const ValueType & | value
| ) |  |

void Gnome::Gda::ServerOperation::set_value_at_as_value | ( | const Glib::ustring & | path_format,
|  | const Glib::ValueBase & | value
| ) |  |

Glib::SignalProxy2< void,Glib::ustring,int > Gnome::Gda::ServerOperation::signal_signal_sequence_item_added | ( |  | ) |

Slot Prototype:
  `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 | ( |  | ) |

Slot Prototype:
  `void on_my_signal_sequence_item_remove(Glib::ustring arg1, int arg2)`

## Friends And Related Function Documentation

Glib::RefPtr< Gnome::Gda::ServerOperation > wrap | ( | GdaServerOperation * | object,
|  | bool | take_copy = `false`
| ) |  |

related

A Glib::wrap() method for this object.

Parameters

  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.

Returns
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- libgdamm/serveroperation.h