![]() |
![]() |
![]() |
GNOME Data Access manual | ![]() |
---|
GdaDictTableGdaDictTable — Represents a table or a view in the database |
GdaDictTable; GObject* gda_dict_table_new (GdaDict *dict); GdaDictDatabase* gda_dict_table_get_database (GdaDictTable *table); gboolean gda_dict_table_is_view (GdaDictTable *table); const GSList* gda_dict_table_get_parents (GdaDictTable *table); GSList* gda_dict_table_get_constraints (GdaDictTable *table); GdaDictConstraint* gda_dict_table_get_pk_constraint (GdaDictTable *table); gboolean gda_dict_table_update_dbms_data (GdaDictTable *table, GError **error);
Use this object to query the real structure of the table it represents.
It implements the GdaXmlStorage and GdaEntity interfaces.
GObject* gda_dict_table_new (GdaDict *dict);
Creates a new GdaDictTable object
dict : |
a GdaDict object |
Returns : | the new object |
GdaDictDatabase* gda_dict_table_get_database (GdaDictTable *table);
Get the database to which the table belongs
table : |
a GdaDictTable object |
Returns : | a GdaDictDatabase pointer |
gboolean gda_dict_table_is_view (GdaDictTable *table);
Does the object represent a view rather than a table?
table : |
a GdaDictTable object |
Returns : | TRUE if it is a view |
const GSList* gda_dict_table_get_parents (GdaDictTable *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 GdaDictTable object |
Returns : | a constant list of GdaDictTable objects |
GSList* gda_dict_table_get_constraints (GdaDictTable *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 GdaDictTable object |
Returns : | a new list of GdaDictConstraint objects |
GdaDictConstraint* gda_dict_table_get_pk_constraint (GdaDictTable *table);
Get the primary key constraint of table
, if there is any. If several
GdaDictConstraint represent a primary key constraint for table
, then
the first one in the list of constraints is returned.
table : |
a GdaDictTable object |
Returns : | a GdaDictConstraint object or NULL .
|
gboolean gda_dict_table_update_dbms_data (GdaDictTable *table, GError **error);
table : |
|
error : |
|
Returns : |
<< GdaDictDatabase | GdaDictField >> |