Gda.DataModelArray

g GObject.GInterface GObject.GInterface Gda.DataModel Gda.DataModel GObject.GInterface->Gda.DataModel GObject.Object GObject.Object Gda.DataModelArray Gda.DataModelArray GObject.Object->Gda.DataModelArray Gda.DataModel->Gda.DataModelArray

Subclasses:None

Methods

Inherited:GObject.Object (37), Gda.DataModel (43)
Structs:GObject.ObjectClass (5)
class new (cols)
class new_with_g_types (cols, types)
  clear ()
  get_row (row)
  set_n_columns (cols)

Virtual Methods

Inherited:GObject.Object (7), Gda.DataModel (27)

Properties

Name Type Flags Short Description
n-columns int r/w The number of columns in the model
read-only bool r/w Whether data model can be modified

Fields

Inherited:GObject.Object (1), Gda.DataModel (6)
Name Type Access Description
object GObject.Object r  

Class Details

class Gda.DataModelArray(**kwargs)
Bases:GObject.Object, Gda.DataModel
Abstract:No
Structure:Gda.DataModelArrayClass
classmethod new(cols)
Parameters:cols (int) – number of columns for rows in this data model.
Returns:a pointer to the newly created Gda.DataModel.
Return type:Gda.DataModel

Creates a new Gda.DataModel object without initializing the column types. Using Gda.DataModelArray.new_with_g_types() is usually better.

classmethod new_with_g_types(cols, types)
Parameters:
  • cols (int) – number of columns for rows in this data model.
  • types ([GObject.GType]) – array of types of the columns of the model to create as GObject.GType, as many as indicated by cols
Returns:

a pointer to the newly created Gda.DataModel.

Return type:

Gda.DataModel

Creates a new Gda.DataModel object with the column types as specified.

New in version 4.2.6.

clear()

Frees all the rows in self.

get_row(row)
Parameters:row (int) – row number (starting from 0)
Raises:GLib.Error
Returns:the Gda.Row, or None if an error occurred
Return type:Gda.Row

Get a pointer to a row in self

set_n_columns(cols)
Parameters:cols (int) – number of columns for rows this data model should use.

Sets the number of columns for rows inserted in this model. cols must be greated than or equal to 0.

Also clears self’s contents.

Property Details

Gda.DataModelArray.props.n_columns
Name:n-columns
Type:int
Default Value:0
Flags:READABLE, WRITABLE

The number of columns in the model

Gda.DataModelArray.props.read_only
Name:read-only
Type:bool
Default Value:False
Flags:READABLE, WRITABLE

Whether data model can be modified