![]() | ![]() | ![]() | Libgnomedb Reference Manual | ![]() |
---|
GnomeDbTableGnomeDbTable — Represents a table or a view in the database |
GnomeDbTable; guint 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);
Use this object to query the real structure of the table it represents.
It implements the GnomeDbXmlStorage and GnomeDbEntity interfaces.
GObject* gnome_db_table_new (GnomeDbDict *dict);
Creates a new GnomeDbTable object
dict : | a GnomeDbDict object |
Returns : | the new object |
GnomeDbDatabase* gnome_db_table_get_database (GnomeDbTable *table);
Get the database to which the table belongs
table : | a GnomeDbTable object |
Returns : | a GnomeDbDatabase pointer |
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 |
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 |
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 |
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. |
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 |
gboolean gnome_db_table_update_dbms_data (GnomeDbTable *table, GError **error);
table : | |
error : | |
Returns : |
void user_function (GnomeDbTable *dbtable, gpointer user_data);
dbtable : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
<< GnomeDbDatabase | GnomeDbTableField >> |