GNOME Data Access manual |
---|
struct GdaXmlDatabasePrivate; GdaXmlDatabase* gda_xml_database_new (void); GdaXmlDatabase* gda_xml_database_new_from_uri (const gchar *uri); const gchar* gda_xml_database_get_name (GdaXmlDatabase *xmldb); void gda_xml_database_set_name (GdaXmlDatabase *xmldb, const gchar *name); const gchar* gda_xml_database_get_uri (GdaXmlDatabase *xmldb); void gda_xml_database_set_uri (GdaXmlDatabase *xmldb, const gchar *uri); void gda_xml_database_changed (GdaXmlDatabase *xmldb); void gda_xml_database_reload (GdaXmlDatabase *xmldb); gboolean gda_xml_database_save (GdaXmlDatabase *xmldb, const gchar *uri); gchar* gda_xml_database_to_string (GdaXmlDatabase *xmldb); GList* gda_xml_database_get_tables (GdaXmlDatabase *xmldb); void gda_xml_database_free_table_list (GList *list); GdaTable* gda_xml_database_find_table (GdaXmlDatabase *xmldb, const gchar *name); GdaTable* gda_xml_database_new_table (GdaXmlDatabase *xmldb, const gchar *name); GdaTable* gda_xml_database_new_table_from_model (GdaXmlDatabase *xmldb, const gchar *name, const GdaDataModel *model, gboolean add_data); GdaTable* gda_xml_database_new_table_from_node (GdaXmlDatabase *xmldb, xmlNodePtr xmlnode);
GdaXmlDatabase* gda_xml_database_new (void);
Creates a new GdaXmlDatabase object, which can be used to describe a database which will then be loaded by a provider to create its defined structure
Returns : |
|
GdaXmlDatabase* gda_xml_database_new_from_uri (const gchar *uri);
uri : | |
Returns : |
|
const gchar* gda_xml_database_get_name (GdaXmlDatabase *xmldb);
Return the name of the given XML database.
xmldb : | XML database. |
Returns : | the name of the database. |
void gda_xml_database_set_name (GdaXmlDatabase *xmldb, const gchar *name);
xmldb : | |
name : |
|
const gchar* gda_xml_database_get_uri (GdaXmlDatabase *xmldb);
Return the URI associated with the given XML database. This URI will be used when saving the XML database (gda_xml_database_save) and no URI is given.
xmldb : | XML database. |
Returns : | the URI for the XML database. |
void gda_xml_database_set_uri (GdaXmlDatabase *xmldb, const gchar *uri);
xmldb : | XML database. |
uri : |
|
void gda_xml_database_changed (GdaXmlDatabase *xmldb);
Emit the "changed" signal for the given XML database
xmldb : | XML database |
void gda_xml_database_reload (GdaXmlDatabase *xmldb);
Reload the given XML database from its original place, discarding all changes that may have happened.
xmldb : | XML database. |
gboolean gda_xml_database_save (GdaXmlDatabase *xmldb, const gchar *uri);
Save the given XML database to disk.
xmldb : | XML database. |
uri : | URI to save the XML database to. |
Returns : |
gchar* gda_xml_database_to_string (GdaXmlDatabase *xmldb);
Get the given XML database contents as a XML string.
xmldb : | a GdaXmlDatabase object. |
Returns : | the XML string representing the structure and contents of the given GdaXmlDatabase object. The returned value must be freed when no longer needed. |
GList* gda_xml_database_get_tables (GdaXmlDatabase *xmldb);
Return a list of all table names present in the given database. You must free the returned GList when you no longer need it, by using the gda_xml_database_free_table_list function.
xmldb : | XML database. |
Returns : | a GList of strings. |
void gda_xml_database_free_table_list (GList *list);
Free a GList of strings returned by gda_xml_database_get_tables.
list : | list of tables, as returned by gda_xml_database_get_tables. |
GdaTable* gda_xml_database_find_table (GdaXmlDatabase *xmldb, const gchar *name);
Searches the given XML database for a table named name, and returns a pointer to it.
xmldb : | XML database. |
name : | Name for the table to look for. |
Returns : | a pointer to the table, or NULL if not found. |
GdaTable* gda_xml_database_new_table (GdaXmlDatabase *xmldb, const gchar *name);
Create a new empty table in the given XML database.
xmldb : | XML database. |
name : | Name for the new table. |
Returns : | a pointer to the newly created in-memory table. |
GdaTable* gda_xml_database_new_table_from_model (GdaXmlDatabase *xmldb, const gchar *name, const GdaDataModel *model, gboolean add_data);
Create a new table in the given XML database from the given GdaDataModel.
xmldb : | XML database. |
name : | Name for the new table. |
model : | Model to create the table from. |
add_data : | Whether to add model's data or not. |
Returns : | a pointer to the newly created in-memory table. |
GdaTable* gda_xml_database_new_table_from_node (GdaXmlDatabase *xmldb, xmlNodePtr xmlnode);
Add a table to the given XML database by parsong the given XML node pointer, which usually is obtained from an already loaded xmlDocPtr.
xmldb : | XML Database. |
xmlnode : | |
Returns : | a pointer to the newly created in-memory table. |
<<< GdaXmlConnection | GdaXmlDocument >>> |