![]() | ![]() | ![]() | Libmergeant Reference Manual | ![]() |
---|
#define MG_DB_TABLE_TYPE #define MG_DB_TABLE (obj) #define IS_MG_DB_TABLE (obj) #define MG_DB_TABLE_CLASS (klass) struct MgDbTable; guint mg_db_table_get_type (void); GObject* mg_db_table_new (MgConf *conf); MgDatabase* mg_db_table_get_database (MgDbTable *table); gboolean mg_db_table_is_view (MgDbTable *table); const GSList* mg_db_table_get_parents (MgDbTable *table); GSList* mg_db_table_get_constraints (MgDbTable *table); MgDbConstraint* mg_db_table_get_pk_constraint (MgDbTable *table); MgConf* mg_db_table_get_conf (MgDbTable *table); gboolean mg_db_table_update_dbms_data (MgDbTable *table, GError **error);
Use this object to query the real structure of the table it represents.
It implements the MgXmlStorage and MgEntity interfaces.
#define MG_DB_TABLE(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mg_db_table_get_type(), MgDbTable)
obj : |
|
#define IS_MG_DB_TABLE(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mg_db_table_get_type ())
obj : |
|
#define MG_DB_TABLE_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mg_db_table_get_type (), MgDbTableClass)
klass : |
|
GObject* mg_db_table_new (MgConf *conf);
Creates a new MgDbTable object
conf : | a MgConf object |
Returns : | the new object |
MgDatabase* mg_db_table_get_database (MgDbTable *table);
Get the database to which the table belongs
table : | a MgDbTable object |
Returns : | a MgDatabase pointer |
gboolean mg_db_table_is_view (MgDbTable *table);
Does the object represent a view rather than a table?
table : | a MgDbTable object |
Returns : | TRUE if it is a view |
const GSList* mg_db_table_get_parents (MgDbTable *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 MgDbTable object |
Returns : | a constant list of MgDbTable objects |
GSList* mg_db_table_get_constraints (MgDbTable *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 MgDbTable object |
Returns : | a new list of MgDbConstraint objects |
MgDbConstraint* mg_db_table_get_pk_constraint (MgDbTable *table);
Get the primary key constraint of table, if there is any. If several MgDbConstraint represent a primary key constraint for table, then the first one in the list of constraints is returned.
table : | a MgDbTable object |
Returns : | a MgDbConstraint object or NULL. |
MgConf* mg_db_table_get_conf (MgDbTable *table);
Get the MgConf to which the table is associated
table : | a MgDbTable object |
Returns : | the MgConf object |
void user_function (MgDbTable *mgdbtable, gpointer user_data);
mgdbtable : | the object which received the signal. |
user_data : | user data set when the signal handler was connected. |
<<< MgDatabase | MgDbField >>> |