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.MetaStore
from which the newGda.MetaStruct
object will fetch informationfeatures (
Gda.MetaStructFeature
) – the kind of extra information the newGda.MetaStruct
object will compute
- Returns:
the newly created
Gda.MetaStruct
object- Return type:
Creates a new
Gda.MetaStruct
object. 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.Value
orNone
) – the catalog the object belongs to (as aGObject.TYPE_STRING
GObject.Value
), orNone
schema (
GObject.Value
orNone
) – the schema the object belongs to (as aGObject.TYPE_STRING
GObject.Value
), orNone
name (
GObject.Value
) – the object’s name (as aGObject.TYPE_STRING
GObject.Value
), notNone
- Raises:
- Returns:
the
Gda.MetaDbObject
corresponding to the database object if no error occurred, orNone
- Return type:
Creates a new
Gda.MetaDbObject
structure 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
None
and 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:
True
if no error occurred- Return type:
This method is similar to
Gda.MetaStruct.complement
() andGda.MetaStruct.complement_default
() but createsGda.MetaDbObject
for all the database object.Please refer to
Gda.MetaStruct.complement
() form more information.
- complement_default()¶
- Raises:
- Returns:
True
if no error occurred- Return type:
This method is similar to
Gda.MetaStruct.complement
() andGda.MetaStruct.complement_all
() but createsGda.MetaDbObject
for 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.MetaDbObject
part of self- Raises:
- Returns:
True
if no error occurred- Return type:
This method is similar to
Gda.MetaStruct.complement
() but createsGda.MetaDbObject
for all the dependencies of dbo.Please refer to
Gda.MetaStruct.complement
() form more information.
- complement_schema(catalog, schema)¶
- Parameters:
catalog (
GObject.Value
orNone
) – name of a catalog, orNone
schema (
GObject.Value
orNone
) – name of a schema, orNone
- Raises:
- Returns:
True
if no error occurred- Return type:
This method is similar to
Gda.MetaStruct.complement
() but createsGda.MetaDbObject
for 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 isNone
then any schema will be used (if schema isNone
then 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
None
if an error occurred.- Return type:
Creates a new graph (in the GraphViz syntax) representation of self.
- get_all_db_objects()¶
- Returns:
a new
GLib.SList
list of pointers toGda.MetaDbObject
structures which must be destroyed after usage using g_slist_free(). The individualGda.MetaDbObject
must not be modified.- Return type:
Get a list of all the
Gda.MetaDbObject
structures representing database objects in self. Note that noGda.MetaDbObject
structure must not be modified.
- get_db_object(catalog, schema, name)¶
- Parameters:
catalog (
GObject.Value
orNone
) – the catalog the object belongs to (as aGObject.TYPE_STRING
GObject.Value
), orNone
schema (
GObject.Value
orNone
) – the schema the object belongs to (as aGObject.TYPE_STRING
GObject.Value
), orNone
name (
GObject.Value
) – the object’s name (as aGObject.TYPE_STRING
GObject.Value
), notNone
- Returns:
the
Gda.MetaDbObject
orNone
if not found- Return type:
Tries to locate the
Gda.MetaDbObject
structure 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:
True
if 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:
True
if 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.MetaStore
object to fetch information from