Top |
Types and Values
#define | GDA_DATA_PIVOT_ERROR |
enum | GdaDataPivotError |
enum | GdaDataPivotAggregate |
enum | GdaDataPivotFieldType |
Description
The GdaDataPivot data model allows one to do some analysis and summarisation on the contents of a data model.
Functions
gda_data_pivot_new ()
GdaDataModel *
gda_data_pivot_new (GdaDataModel *model
);
Creates a new GdaDataModel which will contain analysed data from model
.
gda_data_pivot_add_field ()
gboolean gda_data_pivot_add_field (GdaDataPivot *pivot
,GdaDataPivotFieldType field_type
,const gchar *field
,const gchar *alias
,GError **error
);
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).
Parameters
pivot |
a GdaDataPivot object |
|
field_type |
the type of field to add |
|
field |
the field description, see below |
|
alias |
the field alias, or |
[allow-none] |
error |
ta place to store errors, or |
[allow-none] |
Since: 5.0
gda_data_pivot_add_data ()
gboolean gda_data_pivot_add_data (GdaDataPivot *pivot
,GdaDataPivotAggregate aggregate_type
,const gchar *field
,const gchar *alias
,GError **error
);
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).
Parameters
pivot |
a GdaDataPivot object |
|
aggregate_type |
the type of aggregate operation to perform |
|
field |
the field description, see below |
|
alias |
the field alias, or |
[allow-none] |
error |
ta place to store errors, or |
[allow-none] |
Since: 5.0
gda_data_pivot_populate ()
gboolean gda_data_pivot_populate (GdaDataPivot *pivot
,GError **error
);
Acutally populates pivot
by analysing the data from the provided data model.
Since: 5.0
Types and Values
Property Details
The “model”
property
“model” GdaDataModel *
Data model from which data is analysed.
Flags: Read / Write