Gda.MetaTableColumn¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
column_name |
r/w |
the column’s name |
|
column_type |
r/w |
the column’s DBMS’s type |
|
default_value |
r/w |
the column’s default value, represented as a valid SQL value (surrounded by simple quotes for strings, …), or |
|
gtype |
r/w |
the detected column’s |
|
nullok |
r/w |
tells if the column can be |
|
pkey |
r/w |
tells if the column is part of a primary key |
Methods¶
|
|
|
|
|
Details¶
- class Gda.MetaTableColumn¶
This structure represents a table of view’s column, its contents must not be modified.
- foreach_attribute(func, *data)¶
- Parameters:
func (
Gda.AttributesManagerFunc
) – aGda.AttributesManagerFunc
functiondata (
object
orNone
) – user data to be passed as last argument of func each time it is called
Calls func for each attribute set to tcol
- get_attribute(attribute)¶
- Parameters:
attribute (
str
) – attribute name as a string- Returns:
a read-only
GObject.Value
, orNone
if not attribute named attribute has been set for column- Return type:
Get the value associated to a named attribute.
Attributes can have any name, but Libgda proposes some default names, see ‘this section [libgda-5.0-Attributes-manager.synopsis]’.
- set_attribute(attribute, value, destroy)¶
- Parameters:
attribute (
str
) – attribute name as a static stringvalue (
GObject.Value
orNone
) – aGObject.Value
, orNone
destroy (
GLib.DestroyNotify
orNone
) – function called when attribute has to be freed, orNone
Set the value associated to a named attribute.
Attributes can have any name, but Libgda proposes some default names, see ‘this section [libgda-40-Attributes-manager.synopsis]’. If there is already an attribute named attribute set, then its value is replaced with the new value, except if value is
None
, in which case the attribute is removed.Warning: attribute is not copied, if it needs to be freed when not used anymore, then destroy should point to the functions which will free it (typically
GLib.free
()). If attribute does not need to be freed, then destroy can beNone
.