Gnome::Gda::DictTable Class Reference

Represents a table or a view in the database. More...

#include <dicttable.h>

Inheritance diagram for Gnome::Gda::DictTable:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual ~DictTable ()
GdaDictTable* gobj ()
 Provides access to the underlying C GObject.
const GdaDictTable* gobj () const
 Provides access to the underlying C GObject.
GdaDictTable* 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<DictDatabaseget_database ()
 Get the database to which the table belongs.
Glib::RefPtr<const DictDatabaseget_database () const
 Get the database to which the table belongs.
bool is_view () const
 Does the object represent a view rather than a table?
const GSList* get_parents ()
 Get the parent tables of the table given as argument.
GSList* get_constraints ()
 Get all the constraints which apply to the given table (each constraint can represent a NOT 0, a primary key or foreign key or a check constraint.
Glib::RefPtr<DictConstraintget_pk_constraint ()
 Get the primary key constraint of table , if there is any.
Glib::RefPtr<const DictConstraintget_pk_constraint () const
 Get the primary key constraint of table , if there is any.
bool update_dbms_data (std::auto_ptr<Glib::Error>& error)
 Synchronises the Table representation with the table structure which is stored in the DBMS.

Static Public Member Functions

static Glib::RefPtr<DictTablecreate ()

Protected Member Functions

 DictTable ()

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gnome::Gda::DictTablewrap (GdaDictTable* object, bool take_copy=false)

Detailed Description

Represents a table or a view in the database.

Use this object to query the real structure of the table it represents.


Constructor & Destructor Documentation

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

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


Member Function Documentation

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

Reimplemented from Gnome::Gda::Object.

GSList* Gnome::Gda::DictTable::get_constraints (  ) 

Get all the constraints which apply to the given table (each constraint can represent a NOT 0, a primary key or foreign key or a check constraint.

Returns:
A new list of Gda::DictConstraint objects.

Glib::RefPtr<const DictDatabase> Gnome::Gda::DictTable::get_database (  )  const

Get the database to which the table belongs.

Returns:
A Gda::DictDatabase pointer.

Glib::RefPtr<DictDatabase> Gnome::Gda::DictTable::get_database (  ) 

Get the database to which the table belongs.

Returns:
A Gda::DictDatabase pointer.

const GSList* Gnome::Gda::DictTable::get_parents (  ) 

Get the parent tables of the table given as argument.

This is significant only for DBMS which support tables inheritance (like PostgreSQL for example).

Returns:
A constant list of Gda::DictTable objects.

Glib::RefPtr<const DictConstraint> Gnome::Gda::DictTable::get_pk_constraint (  )  const

Get the primary key constraint of table , if there is any.

If several Gda::DictConstraint represent a primary key constraint for table , then the first one in the list of constraints is returned.

Returns:
A Gda::DictConstraint object or 0.

Glib::RefPtr<DictConstraint> Gnome::Gda::DictTable::get_pk_constraint (  ) 

Get the primary key constraint of table , if there is any.

If several Gda::DictConstraint represent a primary key constraint for table , then the first one in the list of constraints is returned.

Returns:
A Gda::DictConstraint object or 0.

const GdaDictTable* Gnome::Gda::DictTable::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::Entity.

GdaDictTable* Gnome::Gda::DictTable::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::Entity.

GdaDictTable* Gnome::Gda::DictTable::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.

bool Gnome::Gda::DictTable::is_view (  )  const

Does the object represent a view rather than a table?

Returns:
true if it is a view.

bool Gnome::Gda::DictTable::update_dbms_data ( std::auto_ptr< Glib::Error > &  error  ) 

Synchronises the Table representation with the table 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:
error Location to store error, or 0.
Returns:
true if no error.


Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::DictTable> wrap ( GdaDictTable *  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:36 2007 for libgdamm by  doxygen 1.4.7