Gda.DataPivot

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

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gda.DataModel (43)

Structs:

GObject.ObjectClass (5)

class

error_quark ()

class

new (model)

add_data (aggregate_type, field, alias)

add_field (field_type, field, alias)

populate ()

Virtual Methods

Inherited:

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

Properties

Name

Type

Flags

Short Description

model

Gda.DataModel

r/w

Data model from which data is analysed

Signals

Inherited:

GObject.Object (1), Gda.DataModel (6)

Fields

Inherited:

GObject.Object (1), Gda.DataModel (6)

Name

Type

Access

Description

object

GObject.Object

r

Class Details

class Gda.DataPivot(**kwargs)
Bases:

GObject.Object, Gda.DataModel

Abstract:

No

Structure:

Gda.DataPivotClass

classmethod error_quark()
Return type:

int

classmethod new(model)
Parameters:

model (Gda.DataModel or None) – a Gda.DataModel to analyse data from, or None

Returns:

a pointer to the newly created Gda.DataModel.

Return type:

Gda.DataModel

Creates a new Gda.DataModel which will contain analysed data from model.

add_data(aggregate_type, field, alias)
Parameters:
  • aggregate_type (Gda.DataPivotAggregate) – the type of aggregate operation to perform

  • field (str) – the field description, see below

  • alias (str or None) – the field alias, or None

Raises:

GLib.Error

Returns:

True if no error occurred

Return type:

bool

Specifies that field has to be included in the analysis. field is a field specification with the following accepted syntaxes:

  • a column name in the source data model (see gda_data_model_get_column_index()); or

  • an SQL expression involving a column name in the source data model, for examples:

    price
    firstname || ' ' || lastname
    nb BETWEEN 5 AND 10
    

It is also possible to specify several fields to be added, while separating them by a comma (in effect still forming a valid SQL syntax).

New in version 5.0.

add_field(field_type, field, alias)
Parameters:
Raises:

GLib.Error

Returns:

True if no error occurred

Return type:

bool

Specifies that field has to be included in the analysis. field is a field specification with the following accepted syntaxes:

  • a column name in the source data model (see gda_data_model_get_column_index()); or

  • an SQL expression involving a column name in the source data model, for example:

    price
    firstname || ' ' || lastname
    nb BETWEEN 5 AND 10
    

It is also possible to specify several fields to be added, while separating them by a comma (in effect still forming a valid SQL syntax).

New in version 5.0.

populate()
Raises:

GLib.Error

Returns:

True if no error occurred.

Return type:

bool

Acutally populates self by analysing the data from the provided data model.

New in version 5.0.

Property Details

Gda.DataPivot.props.model
Name:

model

Type:

Gda.DataModel

Default Value:

None

Flags:

READABLE, WRITABLE

Data model from which data is analysed