GNOME Data Access manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
struct GdaSelectPrivate; GdaDataModel* gda_select_new (void); void gda_select_set_source (GdaSelect *sel, GdaDataModel *source); void gda_select_set_expression (GdaSelect *sel, const gchar *expression); gboolean gda_select_run (GdaSelect *sel); |
GdaDataModel* gda_select_new (void); |
Create a new GdaSelect object, which allows programs to filter GdaDataModel's based on a given expression.
A GdaSelect is just another GdaDataModel-based class, so it can be used in the same way any other data model class is.
void gda_select_set_source (GdaSelect *sel, GdaDataModel *source); |
Associate a data model with the given GdaSelect object to be used as source of data when executing the selection.
void gda_select_set_expression (GdaSelect *sel, const gchar *expression); |
Set the expression to be used on the given GdaSelect object for filtering rows from the source data model (which is set with gda_select_set_source).
gboolean gda_select_run (GdaSelect *sel); |
Run the query and fill in the GdaSelect object with the rows that matched the expression (which can be set with gda_select_set_expression) associated with this GdaSelect object.
After calling this function, if everything is successful, the GdaSelect object will contain the matched rows, which can then be accessed like a normal GdaDataModel.