DataPivot

Constructors

this
this(void* ptr, Flag!"Take" take)

Members

Functions

addData
bool addData(gda.types.DataPivotAggregate aggregateType, string field, string alias_)

Specifies that field has to be included in the analysis. field is a field specification with the following accepted syntaxes: <itemizedlist> <listitem><para>a column name in the source data model (see <link linkend="gda-data-model-get-column-index">gda.data_model.DataModel.getColumnIndex</link>); or</para></listitem> <listitem><para>an SQL expression involving a column name in the source data model, for examples: <programlisting> price firstname || ' ' || lastname nb BETWEEN 5 AND 10</programlisting> </para></listitem> </itemizedlist>

addField
bool addField(gda.types.DataPivotFieldType fieldType, string field, string alias_)

Specifies that field has to be included in the analysis. field is a field specification with the following accepted syntaxes: <itemizedlist> <listitem><para>a column name in the source data model (see <link linkend="gda-data-model-get-column-index">gda.data_model.DataModel.getColumnIndex</link>); or</para></listitem> <listitem><para>an SQL expression involving a column name in the source data model, for example: <programlisting> price firstname || ' ' || lastname nb BETWEEN 5 AND 10</programlisting> </para></listitem> </itemizedlist>

populate
bool populate()

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

self
DataPivot self()

Returns this, for use in with statements.

Properties

_gType
GType _gType [@property getter]
model
gda.data_model.DataModel model [@property getter]
model
gda.data_model.DataModel model [@property setter]

Static functions

_getGType
GType _getGType()
errorQuark
glib.types.Quark errorQuark()
new_
gda.data_model.DataModel new_(gda.data_model.DataModel model)

Creates a new #GdaDataModel which will contain analysed data from model.

Mixed In Members

From mixin DataModelT!()

addDataFromXmlNode
bool addDataFromXmlNode(libxml2.types.NodePtr node)

Adds the data from an XML node to the given data model (see the DTD for that node in the $prefix/share/libgda/dtd/libgda-array.dtd file).

appendRow
int appendRow()

Appends a row to the data model (the new row will possibly have NULL values for all columns, or some other values depending on the data model implementation)

appendValues
int appendValues(gobject.value.Value[] values)

Appends a row to the given data model. If any value in values is actually null, then it is considered as a default value. If values is null then all values are set to their default value.

arrayCopyModel
gda.data_model_array.DataModelArray arrayCopyModel()

Makes a copy of src into a new #GdaDataModelArray object

arrayCopyModelExt
gda.data_model_array.DataModelArray arrayCopyModelExt(int[] cols)

Like gda.data_model.DataModel.arrayCopyModel, makes a copy of src, but copies only some columns.

createIter
gda.data_model_iter.DataModelIter createIter()

Creates a new iterator object #GdaDataModelIter object which can be used to iterate through rows in model. The new #GdaDataModelIter does not hold any reference to model (ie. if model is destroyed at some point, the new iterator will become useless but in any case it will not prevent the data model from being destroyed).

describeColumn
gda.column.Column describeColumn(int col)

Queries the underlying data model implementation for a description of a given column. That description is returned in the form of a #GdaColumn structure, which contains all the information about the given column in the data model.

dump
void dump(void* toStream)

Dumps a textual representation of the model to the to_stream stream

dumpAsString
string dumpAsString()

Dumps a textual representation of the model into a new string. The main differences with gda.data_model.DataModel.exportToString are that the formatting options are passed using environment variables, and that the data is dumped regardless of the user locale (e.g. dates are not formatted according to the locale).

exportToFile
bool exportToFile(gda.types.DataModelIOFormat format, string file, int[] cols, int[] rows, gda.set.Set options)

Exports data contained in model to the file file; the format is specified using the format argument. Note that the date format used is the one used by the connection from which the data model has been made (as the result of a SELECT statement), or, for other kinds of data models, the default format (refer to gda.data_handler.DataHandler.getDefault) unless the "cnc" property has been set and points to a #GdaConnection to use that connection's date format.

exportToString
string exportToString(gda.types.DataModelIOFormat format, int[] cols, int[] rows, gda.set.Set options)

Exports data contained in model to a string; the format is specified using the format argument, see the gda.data_model.DataModel.exportToFile documentation for more information about the options argument (except for the "OVERWRITE" option).

freeze
void freeze()

Disables notifications of changes on the given data model. To re-enable notifications again, you should call the #gda_data_model_thaw function.

getAccessFlags
gda.types.DataModelAccessFlags getAccessFlags()

Get the attributes of model such as how to access the data it contains if it's modifiable, etc.

getAttributesAt
gda.types.ValueAttribute getAttributesAt(int col, int row)

Get the attributes of the value stored at (row, col) in model, which is an ORed value of #GdaValueAttribute flags. As a special case, if row is -1, then the attributes returned correspond to a "would be" value if a row was added to model.

getColumnIndex
int getColumnIndex(string name)

Get the index of the first column named name in model.

getColumnName
string getColumnName(int col)
getColumnTitle
string getColumnTitle(int col)
getNColumns
int getNColumns()
getNRows
int getNRows()
getNotify
bool getNotify()

Returns the status of notifications changes on the given data model.

getTypedValueAt
gobject.value.Value getTypedValueAt(int col, int row, gobject.types.GType expectedType, bool nullok)

Upon errors null will be returned and error will be assigned a #GError from the #GDA_DATA_MODEL_ERROR domain.

getValueAt
gobject.value.Value getValueAt(int col, int row)

Retrieves the data stored in the given position (identified by the col and row parameters) on a data model.

iterAtRow
bool iterAtRow(gda.data_model_iter.DataModelIter iter, int row)

Moves iter to the row number given by row.

iterNext
bool iterNext(gda.data_model_iter.DataModelIter iter)

Moves iter to the next row in model.

iterPrev
bool iterPrev(gda.data_model_iter.DataModelIter iter)

Moves iter to the next row in model.

iterSetValue
bool iterSetValue(gda.data_model_iter.DataModelIter iter, int col, gobject.value.Value value)

Set value to the given column and row pointed by iter in the given model.

removeRow
bool removeRow(int row)

Removes a row from the data model.

reset
void reset()

Emits the 'reset' and 'changed' signal on model.

rowInserted
void rowInserted(int row)

Emits the 'row_inserted' and 'changed' signals on model.

rowRemoved
void rowRemoved(int row)

Emits the 'row_removed' and 'changed' signal on model.

rowUpdated
void rowUpdated(int row)

Emits the 'row_updated' and 'changed' signals on model.

sendHint
void sendHint(gda.types.DataModelHint hint, gobject.value.Value hintValue)

Sends a hint to the data model. The hint may or may not be handled by the data model, depending on its implementation

setColumnName
void setColumnName(int col, string name)

Sets the name of the given col in model, and if its title is not set, also sets the title to name.

setColumnTitle
void setColumnTitle(int col, string title)

Sets the title of the given col in model.

setNotify
void setNotify(bool doNotifyChanges)

Enable or disable notifications changes on the given data model.

setValueAt
bool setValueAt(int col, int row, gobject.value.Value value)

Modifies a value in model, at (col, row).

setValues
bool setValues(int row, gobject.value.Value[] values)

In a similar way to gda.data_model.DataModel.setValueAt, this method modifies a data model's contents by setting several values at once.

thaw
void thaw()

Re-enables notifications of changes on the given data model.

connectAccessChanged
ulong connectAccessChanged(T callback, Flag!"After" after)

Connect to AccessChanged signal.

connectChanged
ulong connectChanged(T callback, Flag!"After" after)

Connect to Changed signal.

connectReset
ulong connectReset(T callback, Flag!"After" after)

Connect to Reset signal.

connectRowInserted
ulong connectRowInserted(T callback, Flag!"After" after)

Connect to RowInserted signal.

connectRowRemoved
ulong connectRowRemoved(T callback, Flag!"After" after)

Connect to RowRemoved signal.

connectRowUpdated
ulong connectRowUpdated(T callback, Flag!"After" after)

Connect to RowUpdated signal.

Inherited Members

From ObjectWrap

_setGObject
void _setGObject(void* cObj, Flag!"Take" take)

Set the GObject of a D ObjectWrap wrapper.

_cPtr
void* _cPtr(Flag!"Dup" dup)

Get a pointer to the underlying C object.

_ref
void* _ref(void* gObj)

Calls g_object_ref() on a GObject.

_unref
_unref(void* gObj)

Calls g_object_unref() on a GObject.

_getGType
GType _getGType()

Get the GType of an object.

_gType
GType _gType [@property getter]

GObject GType property.

self
ObjectWrap self()

Convenience method to return this cast to a type. For use in D with statements.

_getDObject
T _getDObject(void* cptr, Flag!"Take" take)

Template to get the D object from a C GObject and cast it to the given D object type.

connectSignalClosure
ulong connectSignalClosure(string signalDetail, DClosure closure, Flag!"After" after)

Connect a D closure to an object signal.

setProperty
void setProperty(string propertyName, T val)

Template for setting a GObject property.

getProperty
T getProperty(string propertyName)

Template for getting a GObject property.

compatControl
size_t compatControl(size_t what, void* data)
bindProperty
gobject.binding.Binding bindProperty(string sourceProperty, gobject.object.ObjectWrap target, string targetProperty, gobject.types.BindingFlags flags)

Creates a binding between source_property on source and target_property on target.

bindPropertyFull
gobject.binding.Binding bindPropertyFull(string sourceProperty, gobject.object.ObjectWrap target, string targetProperty, gobject.types.BindingFlags flags, gobject.closure.Closure transformTo, gobject.closure.Closure transformFrom)

Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.

forceFloating
void forceFloating()

This function is intended for #GObject implementations to re-enforce a floating[floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling gobject.object.ObjectWrap.refSink.

freezeNotify
void freezeNotify()

Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

getData
void* getData(string key)

Gets a named field from the objects table of associations (see gobject.object.ObjectWrap.setData).

getProperty
void getProperty(string propertyName, gobject.value.Value value)

Gets a property of an object.

getQdata
void* getQdata(glib.types.Quark quark)

This function gets back user data pointers stored via gobject.object.ObjectWrap.setQdata.

getv
void getv(string[] names, gobject.value.Value[] values)

Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.

isFloating
bool isFloating()

Checks whether object has a floating[floating-ref] reference.

notify
void notify(string propertyName)

Emits a "notify" signal for the property property_name on object.

notifyByPspec
void notifyByPspec(gobject.param_spec.ParamSpec pspec)

Emits a "notify" signal for the property specified by pspec on object.

refSink
gobject.object.ObjectWrap refSink()

Increase the reference count of object, and possibly remove the floating[floating-ref] reference, if object has a floating reference.

runDispose
void runDispose()

Releases all references to other objects. This can be used to break reference cycles.

setData
void setData(string key, void* data)

Each object carries around a table of associations from strings to pointers. This function lets you set an association.

setProperty
void setProperty(string propertyName, gobject.value.Value value)

Sets a property on an object.

stealData
void* stealData(string key)

Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

stealQdata
void* stealQdata(glib.types.Quark quark)

This function gets back user data pointers stored via gobject.object.ObjectWrap.setQdata and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:

thawNotify
void thawNotify()

Reverts the effect of a previous call to gobject.object.ObjectWrap.freezeNotify. The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.

watchClosure
void watchClosure(gobject.closure.Closure closure)

This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling gobject.closure.Closure.invalidate on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, gobject.object.ObjectWrap.ref_ and gobject.object.ObjectWrap.unref are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.

connectNotify
ulong connectNotify(string detail, T callback, Flag!"After" after)

Connect to Notify signal.

From DataModel

_getGType
GType _getGType()
errorQuark
glib.types.Quark errorQuark()
addDataFromXmlNode
bool addDataFromXmlNode(libxml2.types.NodePtr node)

Adds the data from an XML node to the given data model (see the DTD for that node in the $prefix/share/libgda/dtd/libgda-array.dtd file).

appendRow
int appendRow()

Appends a row to the data model (the new row will possibly have NULL values for all columns, or some other values depending on the data model implementation)

appendValues
int appendValues(gobject.value.Value[] values)

Appends a row to the given data model. If any value in values is actually null, then it is considered as a default value. If values is null then all values are set to their default value.

arrayCopyModel
gda.data_model_array.DataModelArray arrayCopyModel()

Makes a copy of src into a new #GdaDataModelArray object

arrayCopyModelExt
gda.data_model_array.DataModelArray arrayCopyModelExt(int[] cols)

Like gda.data_model.DataModel.arrayCopyModel, makes a copy of src, but copies only some columns.

createIter
gda.data_model_iter.DataModelIter createIter()

Creates a new iterator object #GdaDataModelIter object which can be used to iterate through rows in model. The new #GdaDataModelIter does not hold any reference to model (ie. if model is destroyed at some point, the new iterator will become useless but in any case it will not prevent the data model from being destroyed).

describeColumn
gda.column.Column describeColumn(int col)

Queries the underlying data model implementation for a description of a given column. That description is returned in the form of a #GdaColumn structure, which contains all the information about the given column in the data model.

dump
void dump(void* toStream)

Dumps a textual representation of the model to the to_stream stream

dumpAsString
string dumpAsString()

Dumps a textual representation of the model into a new string. The main differences with gda.data_model.DataModel.exportToString are that the formatting options are passed using environment variables, and that the data is dumped regardless of the user locale (e.g. dates are not formatted according to the locale).

exportToFile
bool exportToFile(gda.types.DataModelIOFormat format, string file, int[] cols, int[] rows, gda.set.Set options)

Exports data contained in model to the file file; the format is specified using the format argument. Note that the date format used is the one used by the connection from which the data model has been made (as the result of a SELECT statement), or, for other kinds of data models, the default format (refer to gda.data_handler.DataHandler.getDefault) unless the "cnc" property has been set and points to a #GdaConnection to use that connection's date format.

exportToString
string exportToString(gda.types.DataModelIOFormat format, int[] cols, int[] rows, gda.set.Set options)

Exports data contained in model to a string; the format is specified using the format argument, see the gda.data_model.DataModel.exportToFile documentation for more information about the options argument (except for the "OVERWRITE" option).

freeze
void freeze()

Disables notifications of changes on the given data model. To re-enable notifications again, you should call the #gda_data_model_thaw function.

getAccessFlags
gda.types.DataModelAccessFlags getAccessFlags()

Get the attributes of model such as how to access the data it contains if it's modifiable, etc.

getAttributesAt
gda.types.ValueAttribute getAttributesAt(int col, int row)

Get the attributes of the value stored at (row, col) in model, which is an ORed value of #GdaValueAttribute flags. As a special case, if row is -1, then the attributes returned correspond to a "would be" value if a row was added to model.

getColumnIndex
int getColumnIndex(string name)

Get the index of the first column named name in model.

getColumnName
string getColumnName(int col)
getColumnTitle
string getColumnTitle(int col)
getNColumns
int getNColumns()
getNRows
int getNRows()
getNotify
bool getNotify()

Returns the status of notifications changes on the given data model.

getTypedValueAt
gobject.value.Value getTypedValueAt(int col, int row, gobject.types.GType expectedType, bool nullok)

Upon errors null will be returned and error will be assigned a #GError from the #GDA_DATA_MODEL_ERROR domain.

getValueAt
gobject.value.Value getValueAt(int col, int row)

Retrieves the data stored in the given position (identified by the col and row parameters) on a data model.

iterAtRow
bool iterAtRow(gda.data_model_iter.DataModelIter iter, int row)

Moves iter to the row number given by row.

iterNext
bool iterNext(gda.data_model_iter.DataModelIter iter)

Moves iter to the next row in model.

iterPrev
bool iterPrev(gda.data_model_iter.DataModelIter iter)

Moves iter to the next row in model.

iterSetValue
bool iterSetValue(gda.data_model_iter.DataModelIter iter, int col, gobject.value.Value value)

Set value to the given column and row pointed by iter in the given model.

removeRow
bool removeRow(int row)

Removes a row from the data model.

reset
void reset()

Emits the 'reset' and 'changed' signal on model.

rowInserted
void rowInserted(int row)

Emits the 'row_inserted' and 'changed' signals on model.

rowRemoved
void rowRemoved(int row)

Emits the 'row_removed' and 'changed' signal on model.

rowUpdated
void rowUpdated(int row)

Emits the 'row_updated' and 'changed' signals on model.

sendHint
void sendHint(gda.types.DataModelHint hint, gobject.value.Value hintValue)

Sends a hint to the data model. The hint may or may not be handled by the data model, depending on its implementation

setColumnName
void setColumnName(int col, string name)

Sets the name of the given col in model, and if its title is not set, also sets the title to name.

setColumnTitle
void setColumnTitle(int col, string title)

Sets the title of the given col in model.

setNotify
void setNotify(bool doNotifyChanges)

Enable or disable notifications changes on the given data model.

setValueAt
bool setValueAt(int col, int row, gobject.value.Value value)

Modifies a value in model, at (col, row).

setValues
bool setValues(int row, gobject.value.Value[] values)

In a similar way to gda.data_model.DataModel.setValueAt, this method modifies a data model's contents by setting several values at once.

thaw
void thaw()

Re-enables notifications of changes on the given data model.

connectAccessChanged
ulong connectAccessChanged(T callback, Flag!"After" after)

Connect to AccessChanged signal.

connectChanged
ulong connectChanged(T callback, Flag!"After" after)

Connect to Changed signal.

connectReset
ulong connectReset(T callback, Flag!"After" after)

Connect to Reset signal.

connectRowInserted
ulong connectRowInserted(T callback, Flag!"After" after)

Connect to RowInserted signal.

connectRowRemoved
ulong connectRowRemoved(T callback, Flag!"After" after)

Connect to RowRemoved signal.

connectRowUpdated
ulong connectRowUpdated(T callback, Flag!"After" after)

Connect to RowUpdated signal.