Gda.MetaTableColumn

Fields

Name

Type

Access

Description

column_name

str

r/w

the column’s name

column_type

str

r/w

the column’s DBMS’s type

default_value

str

r/w

the column’s default value, represented as a valid SQL value (surrounded by simple quotes for strings, …), or None if column has no default value

gtype

GObject.GType

r/w

the detected column’s GObject.GType

nullok

bool

r/w

tells if the column can be None

pkey

bool

r/w

tells if the column is part of a primary key

Methods

foreach_attribute (func, *data)

get_attribute (attribute)

set_attribute (attribute, value, destroy)

Details

class Gda.MetaTableColumn

This structure represents a table of view’s column, its contents must not be modified.

foreach_attribute(func, *data)
Parameters:

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, or None if not attribute named attribute has been set for column

Return type:

GObject.Value

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:

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 be None.