MetaStore
Object Hierarchy:
Description:
Namespace: Gda
Package: libgda-6.0
Content:
Properties:
- public string catalog { construct; }
- public Connection cnc { owned get; construct; }
- public string cnc_string { construct; }
- public string schema { construct; }
Static methods:
- public static Quark error_quark ()
- public static string sql_identifier_quote (string id, Connection cnc)
Use this method to get a correctly quoted (if necessary) SQL identifier which can be used to retrieve or filter information in a MetaStore which stores meta data about
cnc
.
Creation methods:
- public MetaStore (string? cnc_string)
Create a new MetaStore object.
- public MetaStore.with_file (string file_name)
Create a new MetaStore object using
file_name
as its internal database
Methods:
- public DataModel create_modify_data_model (string table_name)
Creates a new DataModelArray data model which can be used, after being correctly filled, with the gda_meta_store_modify*() methods.
- public MetaStruct create_struct (MetaStructFeature features)
- public bool declare_foreign_key (MetaStruct? mstruct, string fk_name, string? catalog, string? schema, string table, string? ref_catalog, string? ref_schema, string ref_table, string[] colnames, string[] ref_colnames) throws Error
Defines a new declared foreign key into this .
- public DataModel extract (string select_sql, HashTable<string,Value?>? vars) throws Error
Extracts some data stored in this using a custom SELECT query.
- public bool get_attribute_value (string att_name, out string att_value) throws Error
The MetaStore object maintains a list of ( name,value) attributes (attributes names starting with a '_' character are for internal use only and cannot be altered).
- public unowned Connection get_internal_connection ()
Get a pointer to the Connection object internally used by this to store its contents.
- public int get_version ()
Get this's internal schema's version
- public bool modify_v (string table_name, DataModel? new_data, string? condition, string[] value_names, Value[] values) throws Error
Propagates an update to this, the update's contents is represented by
new_data
, this function is primarily reserved to database providers. - public bool modify_with_context (MetaContext context, DataModel? new_data) throws Error
Propagates an update to this, the update's contents is represented by
new_data
, this function is primarily reserved to database providers. - public bool schema_add_custom_object (string xml_description) throws Error
The internal database used by this can be 'augmented' with some user-defined database objects (such as tables or views).
- public SList<unowned string> schema_get_all_tables ()
Get an ordered list of the tables this knows about.
- public SList<unowned string> schema_get_depend_tables (string table_name)
Get an ordered list of the tables this knows about on which the
table_name
table depends (recursively). - public MetaStruct schema_get_structure () throws Error
Creates a new MetaStruct object representing this's internal database structure.
- public bool schema_remove_custom_object (string obj_name) throws Error
Removes the custom database object named
obj_name
. - public bool set_attribute_value (string att_name, string? att_value) throws Error
Set the value of the attribute named
att_name
toatt_value
; see get_attribute_value for more information. - public void set_identifiers_style (SqlIdentifierStyle style)
Specifies how this must handle SQL identifiers it has to store.
- public void set_reserved_keywords_func (SqlReservedKeywordsFunc? func)
Specifies a function which this will use to determine if a keyword is an SQL reserved keyword or not.
- public bool undeclare_foreign_key (MetaStruct? mstruct, string fk_name, string? catalog, string? schema, string table, string? ref_catalog, string? ref_schema, string ref_table) throws Error
Removes a declared foreign key from this.
Signals:
- public signal void meta_changed (SList<MetaStoreChange> changes)
This signal is emitted when the
store
's contents have changed ( the changes are in thechanges
list) - public virtual signal void meta_reset ()
This signal is emitted when the
store
's contents have been reset completely and when no detailed changes are available - public virtual signal Error suggest_update (MetaContext suggest)
This signal is emitted when the contents of a table should be updated (data to update or insert only; deleting data is done automatically).
Inherited Members:
All known members inherited from class GLib.Object