libgdamm Reference Documentation |
Inheritance diagram for Gnome::Gda::DictDatabase:
Public Member Functions | ||||
void | add_constraint (const Glib::RefPtr<DictConstraint>& cstr) | |||
Add the cstr constraint to the database. | ||||
Glib::SListHandle< Glib::RefPtr< const DictConstraint > > | get_all_constraints () const | |||
Get a list of all the constraints applied to the database. | ||||
Glib::SListHandle< Glib::RefPtr< DictConstraint > > | get_all_constraints () | |||
Get a list of all the constraints applied to the database. | ||||
Glib::SListHandle< Glib::RefPtr< const DictConstraint > > | get_all_fk_constraints () const | |||
Get a list of all the constraints applied to the database which represent a foreign constrains. | ||||
Glib::SListHandle< Glib::RefPtr< DictConstraint > > | get_all_fk_constraints () | |||
Get a list of all the constraints applied to the database which represent a foreign constrains. | ||||
Glib::RefPtr<const Dict> | get_dict () const | |||
Fetch the GdaDict object to which the GdaDictDatabase belongs. | ||||
Glib::RefPtr<Dict> | get_dict () | |||
Fetch the GdaDict object to which the GdaDictDatabase belongs. | ||||
Glib::RefPtr<const DictField> | 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. | ||||
Glib::RefPtr<DictField> | 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. | ||||
Glib::RefPtr<const DictField> | get_field_by_xml_id (const Glib::ustring& xml_id) const | |||
Get a reference to a GdaDictField specifying its XML id. | ||||
Glib::RefPtr<DictField> | get_field_by_xml_id (const Glib::ustring& xml_id) | |||
Get a reference to a GdaDictField specifying its XML id. | ||||
Glib::RefPtr<const DictTable> | get_table_by_name (const Glib::ustring& name) const | |||
Get a reference to a GdaDictTable using its name. | ||||
Glib::RefPtr<DictTable> | get_table_by_name (const Glib::ustring& name) | |||
Get a reference to a GdaDictTable using its name. | ||||
Glib::RefPtr<const DictTable> | get_table_by_xml_id (const Glib::ustring& xml_id) const | |||
Get a reference to a GdaDictTable using its XML id. | ||||
Glib::RefPtr<DictTable> | get_table_by_xml_id (const Glib::ustring& xml_id) | |||
Get a reference to a GdaDictTable using its XML id. | ||||
Glib::SListHandle< Glib::RefPtr< const DictConstraint > > | get_table_constraints (const Glib::RefPtr<DictTable>& table) const | |||
Get all the constraints applicable to table. | ||||
Glib::SListHandle< Glib::RefPtr< DictConstraint > > | get_table_constraints (const Glib::RefPtr<DictTable>& table) | |||
Get all the constraints applicable to table. | ||||
Glib::SListHandle< Glib::RefPtr< const DictTable > > | get_tables () const | |||
Get a list of all the tables within db. | ||||
Glib::SListHandle< Glib::RefPtr< DictTable > > | get_tables () | |||
Get a list of all the tables within db. | ||||
Glib::SListHandle< Glib::RefPtr< const DictConstraint > > | get_tables_fk_constraints (const Glib::RefPtr<DictTable>& table1, const Glib::RefPtr<DictTable>& table2, bool table1_has_fk=true) const | |||
Get a list of all the constraints applied to the database which represent a foreign key constrains, between table1 and table2 . | ||||
Glib::SListHandle< Glib::RefPtr< DictConstraint > > | get_tables_fk_constraints (const Glib::RefPtr<DictTable>& table1, const Glib::RefPtr<DictTable>& table2, bool table1_has_fk=true) | |||
Get a list of all the constraints applied to the database which represent a foreign key constrains, between table1 and table2 . | ||||
const GdaDictDatabase* | gobj () const | |||
Provides access to the underlying C GObject. | ||||
GdaDictDatabase* | gobj () | |||
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::SignalProxy1< void, const Glib::RefPtr<DictConstraint >&> | signal_constraint_added () | |||
| ||||
Glib::SignalProxy1< void, const Glib::RefPtr<DictConstraint >&> | signal_constraint_removed () | |||
| ||||
Glib::SignalProxy1< void, const Glib::RefPtr<DictConstraint >&> | signal_constraint_updated () | |||
| ||||
Glib::SignalProxy0<void> | signal_data_update_finished () | |||
| ||||
Glib::SignalProxy0<void> | signal_data_update_started () | |||
| ||||
Glib::SignalProxy1< void, const Glib::RefPtr<DictField >&> | signal_field_added () | |||
| ||||
Glib::SignalProxy1< void, const Glib::RefPtr<DictField >&> | signal_field_removed () | |||
| ||||
Glib::SignalProxy1< void, const Glib::RefPtr<DictField >&> | signal_field_updated () | |||
| ||||
Glib::SignalProxy1< void, const Glib::RefPtr<DictTable >&> | signal_table_added () | |||
| ||||
Glib::SignalProxy1< void, const Glib::RefPtr<DictTable >&> | signal_table_removed () | |||
| ||||
Glib::SignalProxy1< void, const Glib::RefPtr<DictTable >&> | signal_table_updated () | |||
| ||||
Glib::SignalProxy3< void, const Glib::ustring &, int, int > | signal_update_progress () | |||
| ||||
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. | ||||
bool | update_dbms_data (GType limit_to_type, const Glib::ustring& limit_obj_name) | |||
Synchronises the database representation with the database structure which is stored in the DBMS. | ||||
virtual | ~DictDatabase () | |||
Static Public Member Functions | ||||
static Glib::RefPtr<DictDatabase> | create () | |||
Protected Member Functions | ||||
DictDatabase () | ||||
virtual void | on_constraint_added (const Glib::RefPtr<DictConstraint>& constraint) | |||
virtual void | on_constraint_removed (const Glib::RefPtr<DictConstraint>& constraint) | |||
virtual void | on_constraint_updated (const Glib::RefPtr<DictConstraint>& constraint) | |||
virtual void | on_data_update_finished () | |||
virtual void | on_data_update_started () | |||
virtual void | on_field_added (const Glib::RefPtr<DictField>& field) | |||
virtual void | on_field_removed (const Glib::RefPtr<DictField>& field) | |||
virtual void | on_field_updated (const Glib::RefPtr<DictField>& field) | |||
virtual void | on_table_added (const Glib::RefPtr<DictTable>& table) | |||
virtual void | on_table_removed (const Glib::RefPtr<DictTable>& table) | |||
virtual void | on_table_updated (const Glib::RefPtr<DictTable>& table) | |||
virtual void | on_update_progress (const Glib::ustring& msg, int now, int total) | |||
Related Functions | ||||
(Note that these are not member functions.) | ||||
Glib::RefPtr<Gnome::Gda::DictDatabase> | wrap (GdaDictDatabase* object, bool take_copy=false) | |||
|
This object manages an internal dictionary mirroring the real database structure with objects such as DictTable (composed of Dictfield objects) and DictConstraint.
virtual Gnome::Gda::DictDatabase::~DictDatabase | ( | ) | [virtual] |
Gnome::Gda::DictDatabase::DictDatabase | ( | ) | [protected] |
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).
cstr | A Gda::DictConstraint. |
static Glib::RefPtr<DictDatabase> Gnome::Gda::DictDatabase::create | ( | ) | [static] |
Reimplemented from Gnome::Gda::Object.
Glib::SListHandle<Glib::RefPtr<const DictConstraint> > Gnome::Gda::DictDatabase::get_all_constraints | ( | ) | const |
Get a list of all the constraints applied to the database.
Constraints are represented as Gda::DictConstraint objects and represent any type of constraint.
Glib::SListHandle<Glib::RefPtr<DictConstraint> > Gnome::Gda::DictDatabase::get_all_constraints | ( | ) |
Get a list of all the constraints applied to the database.
Constraints are represented as Gda::DictConstraint objects and represent any type of constraint.
Glib::SListHandle<Glib::RefPtr<const DictConstraint> > Gnome::Gda::DictDatabase::get_all_fk_constraints | ( | ) | const |
Get a list of all the constraints applied to the database which represent a foreign constrains.
Constraints are represented as Gda::DictConstraint objects.
Glib::SListHandle<Glib::RefPtr<DictConstraint> > Gnome::Gda::DictDatabase::get_all_fk_constraints | ( | ) |
Get a list of all the constraints applied to the database which represent a foreign constrains.
Constraints are represented as Gda::DictConstraint objects.
Glib::RefPtr<const Dict> Gnome::Gda::DictDatabase::get_dict | ( | ) | const |
Fetch the GdaDict object to which the GdaDictDatabase belongs.
Reimplemented from Gnome::Gda::Object.
Glib::RefPtr<Dict> Gnome::Gda::DictDatabase::get_dict | ( | ) |
Fetch the GdaDict object to which the GdaDictDatabase belongs.
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.
fullname | The name of the requested table field. |
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.
fullname | The name of the requested table field. |
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.
xml_id | The XML id of the requested table field. |
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.
xml_id | The XML id of the requested table field. |
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.
name | The name of the requested table. |
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.
name | The name of the requested table. |
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.
xml_id | The XML id of the requested table. |
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.
xml_id | The XML id of the requested table. |
0
if the requested table does not exist. Glib::SListHandle<Glib::RefPtr<const DictConstraint> > Gnome::Gda::DictDatabase::get_table_constraints | ( | const Glib::RefPtr<DictTable>& | table | ) | const |
Get all the constraints applicable to table.
table | A Gda::DictTable, part of db . |
Glib::SListHandle<Glib::RefPtr<DictConstraint> > Gnome::Gda::DictDatabase::get_table_constraints | ( | const Glib::RefPtr<DictTable>& | table | ) |
Get all the constraints applicable to table.
table | A Gda::DictTable, part of db . |
Glib::SListHandle<Glib::RefPtr<const DictTable> > Gnome::Gda::DictDatabase::get_tables | ( | ) | const |
Glib::SListHandle<Glib::RefPtr<DictTable> > Gnome::Gda::DictDatabase::get_tables | ( | ) |
Glib::SListHandle<Glib::RefPtr<const DictConstraint> > Gnome::Gda::DictDatabase::get_tables_fk_constraints | ( | const Glib::RefPtr<DictTable>& | table1, | |
const Glib::RefPtr<DictTable>& | table2, | |||
bool | table1_has_fk = true | |||
) | const |
Get a list of all the constraints applied to the database which represent a foreign key constrains, between table1 and table2 .
If table1 or table2 are 0
, then the returned foreign key constraints are the ones between any table and table1 or table2 .
Constraints are represented as Gda::DictConstraint objects.
table1 | A Gda::DictTable, or 0 . | |
table2 | A Gda::DictTable, or 0 . | |
table1_has_fk | true if the returned constraints are the one for which table1 contains the foreign key. |
Glib::SListHandle<Glib::RefPtr<DictConstraint> > Gnome::Gda::DictDatabase::get_tables_fk_constraints | ( | const Glib::RefPtr<DictTable>& | table1, | |
const Glib::RefPtr<DictTable>& | table2, | |||
bool | table1_has_fk = true | |||
) |
Get a list of all the constraints applied to the database which represent a foreign key constrains, between table1 and table2 .
If table1 or table2 are 0
, then the returned foreign key constraints are the ones between any table and table1 or table2 .
Constraints are represented as Gda::DictConstraint objects.
table1 | A Gda::DictTable, or 0 . | |
table2 | A Gda::DictTable, or 0 . | |
table1_has_fk | true if the returned constraints are the one for which table1 contains the foreign key. |
const GdaDictDatabase* Gnome::Gda::DictDatabase::gobj | ( | ) | const [inline] |
GdaDictDatabase* Gnome::Gda::DictDatabase::gobj | ( | ) | [inline] |
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.
virtual void Gnome::Gda::DictDatabase::on_constraint_added | ( | const Glib::RefPtr<DictConstraint>& | constraint | ) | [protected, virtual] |
virtual void Gnome::Gda::DictDatabase::on_constraint_removed | ( | const Glib::RefPtr<DictConstraint>& | constraint | ) | [protected, virtual] |
virtual void Gnome::Gda::DictDatabase::on_constraint_updated | ( | const Glib::RefPtr<DictConstraint>& | constraint | ) | [protected, virtual] |
virtual void Gnome::Gda::DictDatabase::on_data_update_finished | ( | ) | [protected, virtual] |
virtual void Gnome::Gda::DictDatabase::on_data_update_started | ( | ) | [protected, virtual] |
virtual void Gnome::Gda::DictDatabase::on_field_added | ( | const Glib::RefPtr<DictField>& | field | ) | [protected, virtual] |
virtual void Gnome::Gda::DictDatabase::on_field_removed | ( | const Glib::RefPtr<DictField>& | field | ) | [protected, virtual] |
virtual void Gnome::Gda::DictDatabase::on_field_updated | ( | const Glib::RefPtr<DictField>& | field | ) | [protected, virtual] |
virtual void Gnome::Gda::DictDatabase::on_table_added | ( | const Glib::RefPtr<DictTable>& | table | ) | [protected, virtual] |
virtual void Gnome::Gda::DictDatabase::on_table_removed | ( | const Glib::RefPtr<DictTable>& | table | ) | [protected, virtual] |
virtual void Gnome::Gda::DictDatabase::on_table_updated | ( | const Glib::RefPtr<DictTable>& | table | ) | [protected, virtual] |
virtual void Gnome::Gda::DictDatabase::on_update_progress | ( | const Glib::ustring & | msg, | |
int | now, | |||
int | total | |||
) | [protected, virtual] |
Glib::SignalProxy1<void,const Glib::RefPtr<DictConstraint>&> Gnome::Gda::DictDatabase::signal_constraint_added | ( | ) |
void constraint_added(const Glib::RefPtr<DictConstraint>& constraint)
Glib::SignalProxy1<void,const Glib::RefPtr<DictConstraint>&> Gnome::Gda::DictDatabase::signal_constraint_removed | ( | ) |
void constraint_removed(const Glib::RefPtr<DictConstraint>& constraint)
Glib::SignalProxy1<void,const Glib::RefPtr<DictConstraint>&> Gnome::Gda::DictDatabase::signal_constraint_updated | ( | ) |
void constraint_updated(const Glib::RefPtr<DictConstraint>& constraint)
Glib::SignalProxy0< void > Gnome::Gda::DictDatabase::signal_data_update_finished | ( | ) |
void data_update_finished()
Glib::SignalProxy0< void > Gnome::Gda::DictDatabase::signal_data_update_started | ( | ) |
void data_update_started()
Glib::SignalProxy1<void,const Glib::RefPtr<DictField>&> Gnome::Gda::DictDatabase::signal_field_added | ( | ) |
void field_added(const Glib::RefPtr<DictField>& field)
Glib::SignalProxy1<void,const Glib::RefPtr<DictField>&> Gnome::Gda::DictDatabase::signal_field_removed | ( | ) |
void field_removed(const Glib::RefPtr<DictField>& field)
Glib::SignalProxy1<void,const Glib::RefPtr<DictField>&> Gnome::Gda::DictDatabase::signal_field_updated | ( | ) |
void field_updated(const Glib::RefPtr<DictField>& field)
Glib::SignalProxy1<void,const Glib::RefPtr<DictTable>&> Gnome::Gda::DictDatabase::signal_table_added | ( | ) |
void table_added(const Glib::RefPtr<DictTable>& table)
Glib::SignalProxy1<void,const Glib::RefPtr<DictTable>&> Gnome::Gda::DictDatabase::signal_table_removed | ( | ) |
void table_removed(const Glib::RefPtr<DictTable>& table)
Glib::SignalProxy1<void,const Glib::RefPtr<DictTable>&> Gnome::Gda::DictDatabase::signal_table_updated | ( | ) |
void table_updated(const Glib::RefPtr<DictTable>& table)
Glib::SignalProxy3< void,const Glib::ustring&,int,int > Gnome::Gda::DictDatabase::signal_update_progress | ( | ) |
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 | |||
) |
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).
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 . |
true
if no error.
Glib::RefPtr<Gnome::Gda::DictDatabase> wrap | ( | GdaDictDatabase * | object, | |
bool | take_copy = false | |||
) | [related] |
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. |