GnomeDbTable

GnomeDbTable — Represents a table or a view in the database

Synopsis




                    GnomeDbTable;
GType               gnome_db_table_get_type             (void);
GObject*            gnome_db_table_new                  (GnomeDbDict *dict);
GnomeDbDatabase*    gnome_db_table_get_database         (GnomeDbTable *table);
gboolean            gnome_db_table_is_view              (GnomeDbTable *table);
const GSList*       gnome_db_table_get_parents          (GnomeDbTable *table);
GSList*             gnome_db_table_get_constraints      (GnomeDbTable *table);
GnomeDbConstraint*  gnome_db_table_get_pk_constraint    (GnomeDbTable *table);
GnomeDbDict*        gnome_db_table_get_dict             (GnomeDbTable *table);
gboolean            gnome_db_table_update_dbms_data     (GnomeDbTable *table,
                                                         GError **error);

Object Hierarchy


  GObject
   +----GnomeDbBase
         +----GnomeDbTable

Implemented Interfaces

GnomeDbTable implements GnomeDbXmlStorage and GnomeDbEntity.

Properties


  "database"                 gpointer              : Read / Write

Signals


  "templ-signal"                                   : Run First

Description

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

It implements the GnomeDbXmlStorage and GnomeDbEntity interfaces.

Details

GnomeDbTable

typedef struct _GnomeDbTable GnomeDbTable;


gnome_db_table_get_type ()

GType               gnome_db_table_get_type             (void);

Returns :

gnome_db_table_new ()

GObject*            gnome_db_table_new                  (GnomeDbDict *dict);

Creates a new GnomeDbTable object

dict : a GnomeDbDict object
Returns : the new object

gnome_db_table_get_database ()

GnomeDbDatabase*    gnome_db_table_get_database         (GnomeDbTable *table);

Get the database to which the table belongs

table : a GnomeDbTable object
Returns : a GnomeDbDatabase pointer

gnome_db_table_is_view ()

gboolean            gnome_db_table_is_view              (GnomeDbTable *table);

Does the object represent a view rather than a table?

table : a GnomeDbTable object
Returns : TRUE if it is a view

gnome_db_table_get_parents ()

const GSList*       gnome_db_table_get_parents          (GnomeDbTable *table);

Get the parent tables of the table given as argument. This is significant only for DBMS which support tables inheritance (like PostgreSQL for example).

table : a GnomeDbTable object
Returns : a constant list of GnomeDbTable objects

gnome_db_table_get_constraints ()

GSList*             gnome_db_table_get_constraints      (GnomeDbTable *table);

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

table : a GnomeDbTable object
Returns : a new list of GnomeDbConstraint objects

gnome_db_table_get_pk_constraint ()

GnomeDbConstraint*  gnome_db_table_get_pk_constraint    (GnomeDbTable *table);

Get the primary key constraint of table, if there is any. If several GnomeDbConstraint represent a primary key constraint for table, then the first one in the list of constraints is returned.

table : a GnomeDbTable object
Returns : a GnomeDbConstraint object or NULL.

gnome_db_table_get_dict ()

GnomeDbDict*        gnome_db_table_get_dict             (GnomeDbTable *table);

Get the GnomeDbDict to which the table is associated

table : a GnomeDbTable object
Returns : the GnomeDbDict object

gnome_db_table_update_dbms_data ()

gboolean            gnome_db_table_update_dbms_data     (GnomeDbTable *table,
                                                         GError **error);

table :
error :
Returns :

Property Details

The "database" property

  "database"                 gpointer              : Read / Write

Signal Details

The "templ-signal" signal

void                user_function                      (GnomeDbTable *dbtable,
                                                        gpointer      user_data)      : Run First

dbtable : the object which received the signal.
user_data : user data set when the signal handler was connected.