libgdamm Reference Documentation

Main Page Namespaces Book

# Gnome::Gda::DictTable Class Reference

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

Inheritance diagram for Gnome::Gda::DictTable:

[legend]
List of all members.

## Public Member Functions

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<const DictDatabase> | get_database () const
| Get the database to which the table belongs.
Glib::RefPtr<DictDatabase> | get_database ()
| Get the database to which the table belongs.
const GSList* | get_parents ()
| Get the parent tables of the table given as argument.
Glib::RefPtr<const DictConstraint> | get_pk_constraint () const
| Get the primary key constraint of table, if there is any.
Glib::RefPtr<DictConstraint> | get_pk_constraint ()
| Get the primary key constraint of table, if there is any.
const GdaDictTable* | gobj () const
| Provides access to the underlying C GObject.
GdaDictTable* | gobj ()
| 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.
bool | is_view () const
| Does the object represent a view rather than a table?
bool | update_dbms_data ()
| Synchronises the Table representation with the table structure which is stored in the DBMS.
virtual | ~DictTable ()

## Static Public Member Functions

static Glib::RefPtr<DictTable> | create ()

## Protected Member Functions

| DictTable ()

## Related Functions

(Note that these are not member functions.)
Glib::RefPtr<Gnome::Gda::DictTable> | wrap (GdaDictTable* object, bool take_copy=false)
| A Glib::wrap() method for this object.

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

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

Returns:
  `true` if no error.

## Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::DictTable> wrap | ( | GdaDictTable * | 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:

- dicttable.h