Gnome::Gda::DictDatabase Class Reference

Represents a database structure in the DBMS server. More...

#include <dictdatabase.h>

Inheritance diagram for Gnome::Gda::DictDatabase:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~DictDatabase ()
GdaDictDatabase* gobj ()
 Provides access to the underlying C GObject.
const GdaDictDatabase* gobj () const
 Provides access to the underlying C GObject.
GdaDictDatabase* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::RefPtr<Dictget_dict ()
 Fetch the GdaDict object to which the GdaDictDatabase belongs.
Glib::RefPtr<const Dictget_dict () const
 Fetch the GdaDict object to which the GdaDictDatabase belongs.
bool update_dbms_data (GType limit_to_type, const Glib::ustring& limit_obj_name, std::auto_ptr<Glib::Error>& error)
 Synchronises the database representation with the database structure which is stored in the DBMS.
void stop_update_dbms_data () const
 When the database updates its internal lists of DBMS objects, a call to this function will stop that update process.
Glib::RefPtr<DictTableget_table_by_name (const Glib::ustring& name)
 Get a reference to a GdaDictTable using its name.
Glib::RefPtr<const DictTableget_table_by_name (const Glib::ustring& name) const
 Get a reference to a GdaDictTable using its name.
Glib::RefPtr<DictTableget_table_by_xml_id (const Glib::ustring& xml_id)
 Get a reference to a GdaDictTable using its XML id.
Glib::RefPtr<const DictTableget_table_by_xml_id (const Glib::ustring& xml_id) const
 Get a reference to a GdaDictTable using its XML id.
Glib::RefPtr<DictFieldget_field_by_name (const Glib::ustring& fullname)
 Get a reference to a GdaDictField specifying the full name (table_name.field_name) of the requested field.
Glib::RefPtr<const DictFieldget_field_by_name (const Glib::ustring& fullname) const
 Get a reference to a GdaDictField specifying the full name (table_name.field_name) of the requested field.
Glib::RefPtr<DictFieldget_field_by_xml_id (const Glib::ustring& xml_id)
 Get a reference to a GdaDictField specifying its XML id.
Glib::RefPtr<const DictFieldget_field_by_xml_id (const Glib::ustring& xml_id) const
 Get a reference to a GdaDictField specifying its XML id.
void add_constraint (const Glib::RefPtr<DictConstraint>& cstr)
 Add the cstr constraint to the database.

Static Public Member Functions

static Glib::RefPtr<DictDatabasecreate ()

Protected Member Functions

 DictDatabase ()

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gnome::Gda::DictDatabasewrap (GdaDictDatabase* object, bool take_copy=false)

Detailed Description

Represents a database structure in the DBMS server.

This object manages an internal dictionary mirroring the real database structure with objects such as DictTable (composed of Dictfield objects) and DictConstraint.


Constructor & Destructor Documentation

virtual Gnome::Gda::DictDatabase::~DictDatabase (  )  [virtual]

Gnome::Gda::DictDatabase::DictDatabase (  )  [protected]


Member Function Documentation

void Gnome::Gda::DictDatabase::add_constraint ( const Glib::RefPtr<DictConstraint>&  cstr  ) 

Add the cstr constraint to the database.

The cstr constraint is a user-defined constraint (which is not part of the database structure itself).

Parameters:
cstr A Gda::DictConstraint.

static Glib::RefPtr<DictDatabase> Gnome::Gda::DictDatabase::create (  )  [static]

Reimplemented from Gnome::Gda::Object.

Glib::RefPtr<const Dict> Gnome::Gda::DictDatabase::get_dict (  )  const

Fetch the GdaDict object to which the GdaDictDatabase belongs.

Returns:
The GdaDict object.

Reimplemented from Gnome::Gda::Object.

Glib::RefPtr<Dict> Gnome::Gda::DictDatabase::get_dict (  ) 

Fetch the GdaDict object to which the GdaDictDatabase belongs.

Returns:
The GdaDict object.

Reimplemented from Gnome::Gda::Object.

Glib::RefPtr<const DictField> Gnome::Gda::DictDatabase::get_field_by_name ( const Glib::ustring fullname  )  const

Get a reference to a GdaDictField specifying the full name (table_name.field_name) of the requested field.

Parameters:
fullname The name of the requested table field.
Returns:
The GdaDictField pointer or 0 if the requested field does not exist.

Glib::RefPtr<DictField> Gnome::Gda::DictDatabase::get_field_by_name ( const Glib::ustring fullname  ) 

Get a reference to a GdaDictField specifying the full name (table_name.field_name) of the requested field.

Parameters:
fullname The name of the requested table field.
Returns:
The GdaDictField pointer or 0 if the requested field does not exist.

Glib::RefPtr<const DictField> Gnome::Gda::DictDatabase::get_field_by_xml_id ( const Glib::ustring xml_id  )  const

Get a reference to a GdaDictField specifying its XML id.

Parameters:
xml_id The XML id of the requested table field.
Returns:
The GdaDictField pointer or 0 if the requested field does not exist.

Glib::RefPtr<DictField> Gnome::Gda::DictDatabase::get_field_by_xml_id ( const Glib::ustring xml_id  ) 

Get a reference to a GdaDictField specifying its XML id.

Parameters:
xml_id The XML id of the requested table field.
Returns:
The GdaDictField pointer or 0 if the requested field does not exist.

Glib::RefPtr<const DictTable> Gnome::Gda::DictDatabase::get_table_by_name ( const Glib::ustring name  )  const

Get a reference to a GdaDictTable using its name.

Parameters:
name The name of the requested table.
Returns:
The GdaDictTable pointer or 0 if the requested table does not exist.

Glib::RefPtr<DictTable> Gnome::Gda::DictDatabase::get_table_by_name ( const Glib::ustring name  ) 

Get a reference to a GdaDictTable using its name.

Parameters:
name The name of the requested table.
Returns:
The GdaDictTable pointer or 0 if the requested table does not exist.

Glib::RefPtr<const DictTable> Gnome::Gda::DictDatabase::get_table_by_xml_id ( const Glib::ustring xml_id  )  const

Get a reference to a GdaDictTable using its XML id.

Parameters:
xml_id The XML id of the requested table.
Returns:
The GdaDictTable pointer or 0 if the requested table does not exist.

Glib::RefPtr<DictTable> Gnome::Gda::DictDatabase::get_table_by_xml_id ( const Glib::ustring xml_id  ) 

Get a reference to a GdaDictTable using its XML id.

Parameters:
xml_id The XML id of the requested table.
Returns:
The GdaDictTable pointer or 0 if the requested table does not exist.

const GdaDictDatabase* Gnome::Gda::DictDatabase::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::Object.

GdaDictDatabase* Gnome::Gda::DictDatabase::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::Object.

GdaDictDatabase* Gnome::Gda::DictDatabase::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gnome::Gda::Object.

void Gnome::Gda::DictDatabase::stop_update_dbms_data (  )  const

When the database updates its internal lists of DBMS objects, a call to this function will stop that update process.

It has no effect when the database is not updating its DBMS data.

bool Gnome::Gda::DictDatabase::update_dbms_data ( GType  limit_to_type,
const Glib::ustring limit_obj_name,
std::auto_ptr< Glib::Error > &  error 
)

Synchronises the database representation with the database structure which is stored in the DBMS.

For this operation to succeed, the connection to the DBMS server MUST be opened (using the corresponding Gda::Connection object).

Parameters:
limit_to_type Limit the DBMS update to this type, or 0 for no limit.
limit_obj_name Limit the DBMS update to objects of this name, or 0 for no limit.
error Location to store error, or 0.
Returns:
true if no error.


Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::DictDatabase> wrap ( GdaDictDatabase *  object,
bool  take_copy = false 
) [related]

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:
Generated on Sat Feb 10 20:06:35 2007 for libgdamm by  doxygen 1.4.7