Gda.DataAccessWrapper¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
Data model being wrapped |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
object |
r |
Class Details¶
- class Gda.DataAccessWrapper(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(model)¶
- Parameters:
model (
Gda.DataModel
) – aGda.DataModel
- Returns:
a pointer to the newly created
Gda.DataModel
.- Return type:
Creates a new
Gda.DataModel
object which buffers the rows of model. This object is useful only if model can only be accessed using cursor based method.
- set_mapping(mapping)¶
- Parameters:
mapping ([
int
] orNone
) – an array ofint
which represents the mapping between self's columns and the columns of the wrapped data model- Returns:
True
if the mapping actually changed- Return type:
self will report as many columns as mapping_size, and for each value at position ‘i’ in mapping, self will report the ‘i’th column, mapped to the wrapped data model column at position mapping[i]. For example if mapping is {3, 4, 0}, then self will report 3 columns, respectively mapped to the 4th, 5th and 1st columns of the wrapped data model (as column numbers start at 0).
If mapping is
None
, then no mapping is done and self's columns will be the same as the wrapped data model.If a column in mapping does not exist in the wrapped data model, then it is simply ignored (no error reported).
Please note that if self has already been used and if the wrapped data model offers a cursor forward access mode, then this method will return
False
and no action will be done.If the mapping is applied, then any existing iterator will be invalid, and self is reset as if it had just been created.
New in version 5.2.
Property Details¶
- Gda.DataAccessWrapper.props.model¶
- Name:
model
- Type:
- Default Value:
- Flags:
Data model being wrapped