GdaSelect

Name

GdaSelect -- 

Synopsis



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);

Description

Details

struct GdaSelectPrivate

struct GdaSelectPrivate;


gda_select_new ()

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.

Returns : the newly created object.


gda_select_set_source ()

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.

sel : a GdaSelect object.
source : a GdaDataModel to use as source.


gda_select_set_expression ()

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).

sel : a GdaSelect object.
expression : the expression to be used for filtering rows.


gda_select_run ()

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.

sel : a GdaSelect object.
Returns : TRUE if successful, FALSE if there was an error.