Gda.MetaStruct¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
  | 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
Properties¶
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w/co  | 
|||
r/w/co  | 
  | 
Signals¶
- Inherited:
 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
object  | 
r  | 
Class Details¶
- class Gda.MetaStruct(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
- classmethod new(store, features)¶
 - Parameters:
 store (
Gda.MetaStore) – aGda.MetaStorefrom which the newGda.MetaStructobject will fetch informationfeatures (
Gda.MetaStructFeature) – the kind of extra information the newGda.MetaStructobject will compute
- Returns:
 the newly created
Gda.MetaStructobject- Return type:
 
Creates a new
Gda.MetaStructobject. The features specifies the extra features which will also be computed: the more features, the more time it takes to run. Features such as table’s columns, each column’s attributes, etc are not optional and will always be computed.
- complement(type, catalog, schema, name)¶
 - Parameters:
 type (
Gda.MetaDbObjectType) – the type of object to add (which can beGda.MetaDbObjectType.UNKNOWN)catalog (
GObject.ValueorNone) – the catalog the object belongs to (as aGObject.TYPE_STRINGGObject.Value), orNoneschema (
GObject.ValueorNone) – the schema the object belongs to (as aGObject.TYPE_STRINGGObject.Value), orNonename (
GObject.Value) – the object’s name (as aGObject.TYPE_STRINGGObject.Value), notNone
- Raises:
 - Returns:
 the
Gda.MetaDbObjectcorresponding to the database object if no error occurred, orNone- Return type:
 
Creates a new
Gda.MetaDbObjectstructure in self to represent the database object (of type type) which can be uniquely identified as catalog.`schema`.`name`.If catalog is not
None, then schema should not beNone.If both catalog and schema are
None, then the database object will be the one which is “visible” by default (that is which can be accessed only by its short name name).If catalog is
Noneand schema is notNone, then the database object will be the one which can be accessed by its schema.`name` name.Important note: catalog, schema and name will be used using the following convention:
be surrounded by double quotes for a case sensitive search
otherwise for case insensitive search
For more information, see the ‘meta data section about SQL identifiers [information_schema:sql_identifiers]’.
- complement_all()¶
 - Raises:
 - Returns:
 Trueif no error occurred- Return type:
 
This method is similar to
Gda.MetaStruct.complement() andGda.MetaStruct.complement_default() but createsGda.MetaDbObjectfor all the database object.Please refer to
Gda.MetaStruct.complement() form more information.
- complement_default()¶
 - Raises:
 - Returns:
 Trueif no error occurred- Return type:
 
This method is similar to
Gda.MetaStruct.complement() andGda.MetaStruct.complement_all() but createsGda.MetaDbObjectfor all the database object which are usable using only their short name (that is which do not need to be prefixed by the schema in which they are to be used).Please refer to
Gda.MetaStruct.complement() form more information.
- complement_depend(dbo)¶
 - Parameters:
 dbo (
Gda.MetaDbObject) – aGda.MetaDbObjectpart of self- Raises:
 - Returns:
 Trueif no error occurred- Return type:
 
This method is similar to
Gda.MetaStruct.complement() but createsGda.MetaDbObjectfor all the dependencies of dbo.Please refer to
Gda.MetaStruct.complement() form more information.
- complement_schema(catalog, schema)¶
 - Parameters:
 catalog (
GObject.ValueorNone) – name of a catalog, orNoneschema (
GObject.ValueorNone) – name of a schema, orNone
- Raises:
 - Returns:
 Trueif no error occurred- Return type:
 
This method is similar to
Gda.MetaStruct.complement() but createsGda.MetaDbObjectfor all the database object which are in the schema schema (and in the catalog catalog). If catalog isNone, then any catalog will be used, and if schema isNonethen any schema will be used (if schema isNonethen catalog must also beNone).Please refer to
Gda.MetaStruct.complement() form more information.
- dump_as_graph(info)¶
 - Parameters:
 info (
Gda.MetaGraphInfo) – informs what kind of information to show in the resulting graph- Raises:
 - Returns:
 a new string, or
Noneif an error occurred.- Return type:
 
Creates a new graph (in the GraphViz syntax) representation of self.
- get_all_db_objects()¶
 - Returns:
 a new
GLib.SListlist of pointers toGda.MetaDbObjectstructures which must be destroyed after usage using g_slist_free(). The individualGda.MetaDbObjectmust not be modified.- Return type:
 
Get a list of all the
Gda.MetaDbObjectstructures representing database objects in self. Note that noGda.MetaDbObjectstructure must not be modified.
- get_db_object(catalog, schema, name)¶
 - Parameters:
 catalog (
GObject.ValueorNone) – the catalog the object belongs to (as aGObject.TYPE_STRINGGObject.Value), orNoneschema (
GObject.ValueorNone) – the schema the object belongs to (as aGObject.TYPE_STRINGGObject.Value), orNonename (
GObject.Value) – the object’s name (as aGObject.TYPE_STRINGGObject.Value), notNone
- Returns:
 the
Gda.MetaDbObjectorNoneif not found- Return type:
 
Tries to locate the
Gda.MetaDbObjectstructure representing the database object named after catalog, schema and name.If one or both of catalog and schema are
None, and more than one database object matches the name, then the return value is alsoNone.
- load_from_xml_file(catalog, schema, xml_spec_file)¶
 - Parameters:
 - Raises:
 - Returns:
 Trueif no error has occurred- Return type:
 
Loads an XML description into self. This method is still experimental and no description the XML file structure is given, and no guarantee that it will remain as it is given.
- sort_db_objects(sort_type)¶
 - Parameters:
 sort_type (
Gda.MetaSortType) – the kind of sorting requested- Raises:
 - Returns:
 Trueif no error occurred- Return type:
 
Reorders the list of database objects within self in a way specified by sort_type.
Property Details¶
- Gda.MetaStruct.props.features¶
 - Name:
 features- Type:
 - Default Value:
 3- Flags:
 
- Gda.MetaStruct.props.meta_store¶
 - Name:
 meta-store- Type:
 - Default Value:
 - Flags:
 
Gda.MetaStoreobject to fetch information from