Defines how changes kept in the data proxy are handled when the proxied data model is changed (using the "model" property). The default is to silently discard all the changes, but if this property is set to %TRUE, then the changes are cached.
If set to %TRUE, each cached change will be re-applied to a newly set proxied data model if
the change's number of columns match the proxied data model's number of columns and based on:
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).
Upon errors FALSE will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
an XML node representing a <gda_array_data> XML node.
Alters the attributes of the value stored at (proxy_row, col) in proxy
. the alter_flags
can only contain the GDA_VALUE_ATTR_IS_NULL, GDA_VALUE_ATTR_IS_DEFAULT and GDA_VALUE_ATTR_IS_UNCHANGED
flags (other flags are ignored).
A proxy row number
a valid column number
flags to alter the attributes
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)
Upon errors -1 will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
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.
Upon errors -1 will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
#GList of #GValue* representing the row to add. The length must match model's column count. These #GValue are value-copied (the user is still responsible for freeing them).
Apply all the changes stored in the proxy to the proxied data model. The changes are done row after row, and if an error occurs, then it is possible that not all the changes to all the rows have been applied.
Commits the modified data in the proxy back into the #GdaDataModel.
the row number to commit
Makes a copy of src
into a new #GdaDataModelArray object
Like gda_data_model_array_copy_model(), makes a copy of src,
but copies only some
columns.
array of src'
s columns to copy into the new array, not %NULL
Creates a binding between source_property
on source
and target_property
on target
.
Whenever the source_property
is changed the target_property
is
updated using the same value. For instance:
g_object_bind_property (action, "active", widget, "sensitive", 0);
Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.
If flags
contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual:
if target_property
on target
changes then the source_property
on source
will be updated as well.
The binding will automatically be removed when either the source
or the
target
instances are finalized. To remove the binding without affecting the
source
and the target
you can just call g_object_unref() on the returned
#GBinding instance.
Removing the binding by calling g_object_unref() on it must only be done if
the binding, source
and target
are only used from a single thread and it
is clear that both source
and target
outlive the binding. Especially it
is not safe to rely on this if the binding, source
or target
can be
finalized from different threads. Keep another reference to the binding and
use g_binding_unbind() instead to be on the safe side.
A #GObject can have multiple bindings.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
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.
This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.
the property on source
to bind
the target #GObject
the property on target
to bind
flags to pass to #GBinding
a #GClosure wrapping the transformation function from the source
to the target,
or %NULL to use the default
a #GClosure wrapping the transformation function from the target
to the source,
or %NULL to use the default
Cancel all the changes stored in the proxy (the proxy
will be reset to its state
as it was just after creation). Note that if there are some cached changes (i.e. not applied
to the current proxied data model), then these cached changes are not cleared (set the "cache-changes"
property to %FALSE for this).
Resets data at the corresponding row and column. If proxy_row
corresponds to a new row, then
that new row is deleted from proxy
.
the row to cancel changes
the column to cancel changes, or less than 0 to cancel any change on the row
row
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).
Depending on the data model's implementation, a new #GdaDataModelIter object may be created,
or a reference to an already existing #GdaDataModelIter may be returned. For example if model
only
supports being accessed using a forward moving cursor (say a the result of a SELECT executed by SQLite
with a cursor access mode specified), then this method will always return the same iterator.
If a new #GdaDataModelIter is created, then the row it represents is undefined.
For models which can be accessed randomly, any row can be set using gda_data_model_iter_move_to_row(), and for models which are accessible sequentially only then use gda_data_model_iter_move_next() (and gda_data_model_iter_move_prev() if supported).
Note: for the #GdaDataProxy data model (which proxies any #GdaDataModel for modifications and
has twice the number of columns of the proxied data model), this method will create an iterator
in which only the columns of the proxied data model appear. If you need to have a #GdaDataModelIter
in which all the proxy's columns appear, create it using:
Marks the row proxy_row
to be deleted
A proxy row number
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.
WARNING: the returned #GdaColumn object belongs to the model
model and
and should not be destroyed; any modification will affect the whole data model.
column number.
Dumps a textual representation of the model
to the to_stream
stream
The following environment variables can affect the resulting output:
where to dump the data model
Dumps a textual representation of the model
into a new string. The main differences with gda_data_model_export_to_string() 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).
The following environment variables can affect the resulting output:
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_get_default()) unless
the "cnc" property has been set and points to a #GdaConnection to use that connection's date format.
Specifically, the parameters in the options
list can be:
Warning: this function uses a #GdaDataModelIter iterator, and if model
does not offer a random access
(check using gda_data_model_get_access_flags()), the iterator will be the same as normally used
to access data in model
previously to calling this method, and this iterator will be moved (point to
another row).
Upon errors %FALSE will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
the format in which to export data
the filename to export to
an array containing which columns of model
will be exported, or %NULL for all columns
an array containing which rows of model
will be exported, or %NULL for all rows
list of options for the export
Exports data contained in model
to a string; the format is specified using the format
argument, see the
gda_data_model_export_to_file() documentation for more information about the options
argument (except for the
"OVERWRITE" option).
Warning: this function uses a #GdaDataModelIter iterator, and if model
does not offer a random access
(check using gda_data_model_get_access_flags()), the iterator will be the same as normally used
to access data in model
previously to calling this method, and this iterator will be moved (point to
another row).
See also gda_data_model_dump_as_string();
the format in which to export data
an array containing which columns of model
will be exported, or %NULL for all columns
an array containing which rows of model
will be exported, or %NULL for all rows
list of options for the export
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 g_object_ref_sink().
Disables notifications of changes on the given data model. To re-enable notifications again, you should call the #gda_data_model_thaw function.
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.
This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.
Get the attributes of model
such as how to access the data it contains if it's modifiable, etc.
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
.
a valid column number
a valid row number, or -1
Get the index of the first column named name
in model
.
a column name
Gets a named field from the objects table of associations (see g_object_set_data()).
name of the key for that association
Get the current filter expression used by proxy
.
Get the total number of filtered rows in proxy
if a filter has been applied. As new rows
(rows added to the proxy and not yet added to the proxied data model) and rows to remove
(rows marked for removal but not yet removed from the proxied data model) are also filtered,
the returned number also contains references to new rows and rows to be removed.
Get the number of rows which have been modified in the proxy (the sum of rows existing in the proxied data model which have been modified, and new rows).
Get the number of rows which have been added to proxy
and which are not part of
the proxied data model.
Returns the status of notifications changes on the given data model.
Gets a property of an object.
The value
can be:
In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().
Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.
the name of the property to get
return location for the property value
Get the number of columns in the proxied data model
Get the number of rows in the proxied data model
Get the proxy'
s proxied model row corresponding to proxy_row
A proxy row number
This function gets back user data pointers stored via g_object_set_qdata().
A #GQuark, naming the user data pointer
Returns the first row where all the values in values
at the columns identified at
cols_index
match. If the row can't be identified, then returns -1;
NOTE: the cols_index
array MUST contain a column index for each value in values
a list of #GValue values (no %NULL is allowed)
an array of #gint containing the column number to match each value of values
Get the number of the last row to be available in proxy
(in reference to the proxied data model)
Get the size of each chunk of data displayed at a time.
Get the number of the first row to be available in proxy
(in reference to the proxied data model)
Upon errors %NULL will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
This method is similar to gda_data_model_get_value_at(), except that it also allows one to specify the expected #GType of the value to get: if the data model returned a #GValue of a type different than the expected one, then this method returns %NULL and an error code.
Note: the same limitations and usage instructions apply as for gda_data_model_get_value_at().
Upon errors %NULL will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
a valid column number.
a valid row number.
the expected data type of the returned value
if TRUE, then NULL values (value of type %GDA_TYPE_NULL) will not generate any error
Retrieves the data stored in the given position (identified by
the col
and row
parameters) on a data model.
Upon errors %NULL will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
This is the main function for accessing data in a model which allows random access to its data. To access data in a data model using a cursor, use a #GdaDataModelIter object, obtained using gda_data_model_create_iter().
Note1: the returned #GValue must not be modified directly (unexpected behaviours may occur if you do so).
Note2: the returned value may become invalid as soon as any Libgda part is executed again, which means if you want to keep the value, a copy must be made, however it will remain valid as long as the only Libgda usage is calling gda_data_model_get_value_at() for different values of the same row.
If you want to modify a value stored in a #GdaDataModel, use the gda_data_model_set_value_at() or gda_data_model_set_values() methods.
Upon errors %NULL will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
a valid column number.
a valid row number.
Get the attributes of the value stored at (proxy_row, col) in proxy,
which
is an ORed value of #GdaValueAttribute flags
a proxy row
a valid proxy column
Retrieve a whole list of values from the proxy
data model. This function
calls gda_data_proxy_get_value()
for each column index specified in cols_index,
and generates a #GSList on the way.
a proxy row
array containing the columns for which the values are requested
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.
the names of each property to get
the values of each property to get
Tells if proxy
contains any modifications not applied to the proxied data model.
Imports data contained in the file
file into model;
the format is detected.
Upon errors FALSE will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
the filename to import from
a #GHashTable for columns translating, or %NULL, see gda_data_model_import_from_model()
list of options for the export
Copy the contents of the from
data model to the to
data model. The copy stops as soon as an error
orrurs.
The cols_trans
is a hash table for which keys are to
columns numbers and the values are
the corresponding column numbers in the from
data model. To set the values of a column in to
to NULL,
create an entry in the hash table with a negative value. For example:
Upon errors FALSE will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
the source #GdaDataModel
TRUE if to
is completely overwritten by from'
s data, and FALSE if from'
s data is appended to to
a #GHashTable for columns translating, or %NULL
Loads the data from string
into model
.
Upon errors FALSE will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
the string to import data from
a hash table containing which columns of model
will be imported, or %NULL for all columns, see gda_data_model_import_from_model()
list of options for the export
Checks whether object
has a [floating][floating-ref] reference.
Moves iter
to the row number given by row
.
a #GdaDataModelIter object.
a row to point to with iter
Moves iter
to the next row in model
.
a #GdaDataModelIter object.
Moves iter
to the next row in model
.
a #GdaDataModelIter object.
Set value
to the given column
and row pointed by iter
in the given model
.
a #GdaDataModelIter object.
the number of column to set value to
the to use to set on
Emits a "notify" signal for the property property_name
on object
.
When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.
Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.
the name of a property installed on the class of object
.
Emits a "notify" signal for the property specified by pspec
on object
.
This function omits the property name lookup, hence it is faster than g_object_notify().
One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:
enum
{
PROP_0,
PROP_FOO,
PROP_LAST
};
static GParamSpec *properties[PROP_LAST];
static void
my_object_class_init (MyObjectClass *klass)
{
properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
0, 100,
50,
G_PARAM_READWRITE);
g_object_class_install_property (gobject_class,
PROP_FOO,
properties[PROP_FOO]);
}
and then notify a change on the "foo" property with:
g_object_notify_by_pspec (self, properties[PROP_FOO]);
the #GParamSpec of a property installed on the class of object
.
Increase the reference count of object,
and possibly remove the
[floating][floating-ref] reference, if object
has a floating reference.
In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.
Since GLib 2.56, the type of object
will be propagated to the return type
under the same conditions as for g_object_ref().
Removes a row from the data model.
Upon errors FALSE will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
the row number to be removed.
Emits the 'reset' and 'changed' signal on model
.
Tells if the row number proxy_row
has changed
A proxy row number
Emits the 'row_inserted' and 'changed' signals on model
.
This method should only be used by #GdaDataModel implementations to signal that a row has been inserted.
row number.
Tells if the row number proxy_row
is marked to be deleted.
A proxy row number
Tells if the row number proxy_row
is a row which has been inserted in proxy
(and is thus not in the proxied data model).
A proxy row number
Emits the 'row_removed' and 'changed' signal on model
.
This method should only be used by #GdaDataModel implementations to signal that a row has been removed
row number.
Emits the 'row_updated' and 'changed' signals on model
.
This method should only be used by #GdaDataModel implementations to signal that a row has been updated.
row number.
Releases all references to other objects. This can be used to break reference cycles.
This function should only be called from object system implementations.
Sends a hint to the data model. The hint may or may not be handled by the data model, depending on its implementation
a hint to send to the model
an optional value to specify the hint, or %NULL
Sets the name
of the given col
in model,
and if its title is not set, also sets the
title to name
.
column number
name for the given column.
Sets the title
of the given col
in model
.
column number
title for the given column.
Each object carries around a table of associations from strings to pointers. This function lets you set an association.
If the object already had an association with that name, the old association will be destroyed.
Internally, the key
is converted to a #GQuark using g_quark_from_string().
This means a copy of key
is kept permanently (even after object
has been
finalized) — so it is recommended to only use a small, bounded set of values
for key
in your program, to avoid the #GQuark storage growing unbounded.
name of the key
data to associate with that key
Sets a filter among the rows presented by proxy
. The filter is defined by a filter expression
which can be any SQL valid expression using proxy'
s columns. For instance if proxy
has the "id" and
"name" columns, then a filter can be "length(name) < 5" to filter only the rows where the length of the
name is strictly inferior to 5, or "id >= 1000 and id < 2000 order by name limit 50" to filter only the rows where the id
is between 1000 and 2000, ordered by name and limited to 50 rows.
Note about column names: real column names can be used (double quoted if necessary), but columns can also be named "_<column number>" with column numbers starting at 1.
Note that any previous filter expression is replaced with the new filter_expr
if no error occurs
(if an error occurs, then any previous filter is left unchanged).
an SQL based expression which will filter the contents of proxy,
or %NULL to remove any previous filter
Enable or disable notifications changes on the given data model.
Set to TRUE if you require notifications.
Orders by the col
column
the column number to order from
Sets a property on an object.
the name of the property to set
the value
Sets the size of each chunk of data to display: the maximum number of rows which
can be "displayed" at a time (the maximum number of rows which proxy
pretends to have).
The default value is arbitrary 300 as it is big enough to
be able to display quite a lot of data, but small enough to avoid too much data
displayed at the same time.
Note: the rows which have been added but not yet committed will always be displayed regardless of the current chunk of data, and the modified rows which are not visible when the displayed chunk of data changes are still held as modified rows.
To remove the chunking of the data to display, simply pass sample_size
the %0 value.
the requested size of a chunk, or 0
Sets the number of the first row to be available in proxy
(in reference to the proxied data model)
the number of the first row to be displayed
Modifies a value in model,
at (col,
row)
.
Upon errors FALSE will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
column number.
row number.
a #GValue (not %NULL)
In a similar way to gda_data_model_set_value_at(), this method modifies a data model's contents by setting several values at once.
If any value in values
is actually %NULL, then the value in the corresponding column is left
unchanged.
Upon errors FALSE will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
row number.
a list of #GValue (or %NULL), one for at most the number of columns of model
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
name of the key
This function gets back user data pointers stored via
g_object_set_qdata() 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:
void
object_add_to_user_list (GObject *object,
const gchar *new_string)
{
// the quark, naming the object data
GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
// retrieve the old string list
GList *list = g_object_steal_qdata (object, quark_string_list);
// prepend new string
list = g_list_prepend (list, g_strdup (new_string));
// this changed 'list', so we need to set it again
g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
}
static void
free_string_list (gpointer data)
{
GList *node, *list = data;
for (node = list; node; node = node->next)
g_free (node->data);
g_list_free (list);
}
Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().
A #GQuark, naming the user data pointer
Re-enables notifications of changes on the given data model.
Reverts the effect of a previous call to
g_object_freeze_notify(). The freeze count is decreased on object
and when it reaches zero, queued "notify" signals are emitted.
Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.
It is an error to call this function when the freeze count is zero.
Remove the "to be deleted" mark at the row proxy_row,
if it existed.
A proxy row number
Decreases the reference count of object
. When its reference count
drops to 0, the object is finalized (i.e. its memory is freed).
If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.
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)
Upon errors -1 will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
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.
Upon errors -1 will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
#GList of #GValue* representing the row to add. The length must match model's column count. These #GValue are value-copied (the user is still responsible for freeing them).
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).
Depending on the data model's implementation, a new #GdaDataModelIter object may be created,
or a reference to an already existing #GdaDataModelIter may be returned. For example if model
only
supports being accessed using a forward moving cursor (say a the result of a SELECT executed by SQLite
with a cursor access mode specified), then this method will always return the same iterator.
If a new #GdaDataModelIter is created, then the row it represents is undefined.
For models which can be accessed randomly, any row can be set using gda_data_model_iter_move_to_row(), and for models which are accessible sequentially only then use gda_data_model_iter_move_next() (and gda_data_model_iter_move_prev() if supported).
Note: for the #GdaDataProxy data model (which proxies any #GdaDataModel for modifications and
has twice the number of columns of the proxied data model), this method will create an iterator
in which only the columns of the proxied data model appear. If you need to have a #GdaDataModelIter
in which all the proxy's columns appear, create it using:
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.
WARNING: the returned #GdaColumn object belongs to the model
model and
and should not be destroyed; any modification will affect the whole data model.
column number.
Returns the first row where all the values in values
at the columns identified at
cols_index
match. If the row can't be identified, then returns -1;
NOTE: the cols_index
array MUST contain a column index for each value in values
a list of #GValue values (no %NULL is allowed)
an array of #gint containing the column number to match each value of values
Get the attributes of model
such as how to access the data it contains if it's modifiable, etc.
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
.
a valid column number
a valid row number, or -1
Returns the status of notifications changes on the given data model.
Retrieves the data stored in the given position (identified by
the col
and row
parameters) on a data model.
Upon errors %NULL will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
This is the main function for accessing data in a model which allows random access to its data. To access data in a data model using a cursor, use a #GdaDataModelIter object, obtained using gda_data_model_create_iter().
Note1: the returned #GValue must not be modified directly (unexpected behaviours may occur if you do so).
Note2: the returned value may become invalid as soon as any Libgda part is executed again, which means if you want to keep the value, a copy must be made, however it will remain valid as long as the only Libgda usage is calling gda_data_model_get_value_at() for different values of the same row.
If you want to modify a value stored in a #GdaDataModel, use the gda_data_model_set_value_at() or gda_data_model_set_values() methods.
Upon errors %NULL will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
a valid column number.
a valid row number.
Moves iter
to the row number given by row
.
a #GdaDataModelIter object.
a row to point to with iter
Moves iter
to the next row in model
.
a #GdaDataModelIter object.
Moves iter
to the next row in model
.
a #GdaDataModelIter object.
Set value
to the given column
and row pointed by iter
in the given model
.
a #GdaDataModelIter object.
the number of column to set value to
the to use to set on
Removes a row from the data model.
Upon errors FALSE will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
the row number to be removed.
Sends a hint to the data model. The hint may or may not be handled by the data model, depending on its implementation
a hint to send to the model
an optional value to specify the hint, or %NULL
Enable or disable notifications changes on the given data model.
Set to TRUE if you require notifications.
Modifies a value in model,
at (col,
row)
.
Upon errors FALSE will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
column number.
row number.
a #GValue (not %NULL)
In a similar way to gda_data_model_set_value_at(), this method modifies a data model's contents by setting several values at once.
If any value in values
is actually %NULL, then the value in the corresponding column is left
unchanged.
Upon errors FALSE will be returned and error
will be assigned a
#GError from the #GDA_DATA_MODEL_ERROR domain.
row number.
a list of #GValue (or %NULL), one for at most the number of columns of model
Emits a "notify" signal for the property property_name
on object
.
When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.
Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.
Emits the 'reset' and 'changed' signal on model
.
Emits the 'row_inserted' and 'changed' signals on model
.
This method should only be used by #GdaDataModel implementations to signal that a row has been inserted.
row number.
Emits the 'row_removed' and 'changed' signal on model
.
This method should only be used by #GdaDataModel implementations to signal that a row has been removed
row number.
Emits the 'row_updated' and 'changed' signals on model
.
This method should only be used by #GdaDataModel implementations to signal that a row has been updated.
row number.
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 g_closure_invalidate() on
it, in order to prevent invocations of the closure with a finalized
(nonexisting) object. Also, g_object_ref() and g_object_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.
#GClosure to watch
Find the #GParamSpec with the given name for an
interface. Generally, the interface vtable passed in as g_iface
will be the default vtable from g_type_default_interface_ref(), or,
if you know the interface has already been loaded,
g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
name of a property to look up.
Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.
This function is meant to be called from the interface's default
vtable initialization function (the class_init
member of
#GTypeInfo.) It must not be called after after class_init
has
been called for any object types implementing this interface.
If pspec
is a floating reference, it will be consumed.
any interface vtable for the interface, or the default vtable for the interface.
the #GParamSpec for the new property
Lists the properties of an interface.Generally, the interface
vtable passed in as g_iface
will be the default vtable from
g_type_default_interface_ref(), or, if you know the interface has
already been loaded, g_type_default_interface_peek().
any interface vtable for the interface, or the default vtable for the interface
Creates a new instance of a #GObject subtype and sets its properties.
Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.
the type id of the #GObject subtype to instantiate
an array of #GParameter
Creates a new proxy for
model
. For bindings usegda_data_proxy_new_with_data_model
.