Gda.Column¶
- Subclasses:
 None
Methods¶
- Inherited:
 - Structs:
 
class  | 
  | 
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
|
  | 
Virtual Methods¶
- Inherited:
 
  | 
|
  | 
Properties¶
Name  | 
Type  | 
Flags  | 
Short Description  | 
|---|---|---|---|
r/w  | 
Column’s Id (warning: the column’s ID is not guaranteed to be unique in a   | 
Signals¶
- Inherited:
 
Name  | 
Short Description  | 
|---|---|
Gets emitted whenever column's type has been changed  | 
|
Gets emitted whenever column's name has been changed  | 
Fields¶
- Inherited:
 
Name  | 
Type  | 
Access  | 
Description  | 
|---|---|---|---|
object  | 
r  | 
Class Details¶
- class Gda.Column(**kwargs)¶
 - Bases:
 - Abstract:
 No
- Structure:
 
- classmethod new()¶
 - Returns:
 a newly allocated
Gda.Columnobject.- Return type:
 
- copy()¶
 - Returns:
 a newly allocated
Gda.Columnwith a copy of the data in self.- Return type:
 
Creates a new
Gda.Columnobject from an existing one.
- get_allow_null()¶
 - 
Gets the ‘allow null’ flag of the given column.
 
- get_attribute(attribute)¶
 - Parameters:
 attribute (
str) – attribute name as a string- Returns:
 a read-only
GObject.Value, orNoneif not attribute named attribute has been set for self- 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-40-Attributes-manager.synopsis]’.
- get_auto_increment()¶
 
- get_default_value()¶
 - Returns:
 self's default value, as a
GObject.Valueobject, orNoneif column does not have a default value- Return type:
 
- get_g_type()¶
 - Returns:
 the type of self.
- Return type:
 
- get_position()¶
 - Returns:
 the position of the column refer to in the containing data model.
- Return type:
 
- set_allow_null(allow)¶
 - Parameters:
 allow (
bool) – whether the given column should allows null values or not.
Sets the ‘allow null’ flag of the given column.
- set_attribute(attribute, value, destroy)¶
 - Parameters:
 attribute (
str) – attribute name as a static stringvalue (
GObject.ValueorNone) – aGObject.Value, orNonedestroy (
GLib.DestroyNotifyorNone) – a function to be called when attribute is not needed anymore, orNone
Set the value associated to a named attribute. The attribute string is ‘stolen’ by this method, and the memory it uses will be freed using the destroy function when no longer needed (if destroy is
None, then the string will not be freed at all).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 (value is copied), except if value is
None, in which case the attribute is removed.For example one would use it as:
Gda.Column.set_attribute(holder,GLib.strdup(my_attribute),GLib.free, my_value);Gda.Column.set_attribute(holder,Gda.ATTRIBUTE_NAME,None, my_value);Note: this method does not modify in any way the contents of the data model for which self is a column (nor does it modify the table definition of the tables used by a SELECT statement is the model was created from a SELECT statement).
- set_auto_increment(is_auto)¶
 - Parameters:
 is_auto (
bool) – auto increment status.
Sets the auto increment flag for the given column.
- set_default_value(default_value)¶
 - Parameters:
 default_value (
GObject.ValueorNone) – defaultGObject.Valuefor the column
Sets self's default
GObject.Value.
- set_g_type(type)¶
 - Parameters:
 type (
GObject.GType) – the new type of self.
Sets the type of self to type.
- set_position(position)¶
 - Parameters:
 position (
int) – the wanted position of the column in the containing data model.
Sets the position of the column refer to in the containing data model.
- do_g_type_changed(old_type, new_type) virtual¶
 - Parameters:
 old_type (
GObject.GType) –new_type (
GObject.GType) –
Signal Details¶
- Gda.Column.signals.g_type_changed(column, old_type, new_type)¶
 - Signal Name:
 g-type-changed- Flags:
 - Parameters:
 column (
Gda.Column) – The object which received the signalold_type (
GObject.GType) – the column’s previous typenew_type (
GObject.GType) – the column’s new type
Gets emitted whenever column's type has been changed
- Gda.Column.signals.name_changed(column, old_name)¶
 - Signal Name:
 name-changed- Flags:
 - Parameters:
 column (
Gda.Column) – The object which received the signalold_name (
str) – the column’s previous name
Gets emitted whenever column's name has been changed