Top |
Subclassing GdaDataSelectSubclassing GdaDataSelect — Base class for all the data models returned by DBMS providers when a SELECT statement is executed |
Functions
void | gda_data_select_take_row () |
GdaRow * | gda_data_select_get_stored_row () |
GdaConnection * | gda_data_select_get_connection () |
void | gda_data_select_set_columns () |
void | gda_data_select_add_exception () |
Description
All database providers should subclass this class when returning a data model after the execution of a SELECT statement. Specifically it has the following features:
See the Virtual methods for recordsets section for more information about how to implement the virtual methods of the subclassed object.
This section documents the methods available for the database provider's implementations.
Functions
gda_data_select_take_row ()
void gda_data_select_take_row (GdaDataSelect *model
,GdaRow *row
,gint rownum
);
Stores row
into model
, externally advertized at row number rownum
(if no row has been removed).
The reference to row
is stolen.
This function is used by database provider's implementations
Parameters
model |
a GdaDataSelect data model |
|
row |
a GdaRow row. |
[transfer full] |
rownum |
"external" advertized row number |
gda_data_select_get_stored_row ()
GdaRow * gda_data_select_get_stored_row (GdaDataSelect *model
,gint rownum
);
Get the GdaRow object stored within model
at row rownum
(without taking care of removed rows)
gda_data_select_get_connection ()
GdaConnection *
gda_data_select_get_connection (GdaDataSelect *model
);
Get a pointer to the GdaConnection object which was used when model
was created
(and which may be used internally by model
).
gda_data_select_set_columns ()
void gda_data_select_set_columns (GdaDataSelect *model
,GSList *columns
);
Makes columns
the list of columns for model
. Both the list and each GdaColumn object in the
list are 'stolen' by model
(ie. when this function returns the caller should not use anymore
the list or each column object in it). This method should not be used directly, it is used by
database provider's implementations.
Since: 4.2.1
gda_data_select_add_exception ()
void gda_data_select_add_exception (GdaDataSelect *model
,GError *error
);
Add an exception to model
.
Since: 4.2.6