libgdamm Reference Documentation
Main Page   Namespaces   Book  

Gnome::Gda::DataModelFilterSQL Class Reference
[Data Models]

Filtering data from one or several DataModel objects. More...

Inheritance diagram for Gnome::Gda::DataModelFilterSQL:

Inheritance graph
[legend]
List of all members.

Public Member Functions

void add_source (const Glib::ustring& name, const Glib::RefPtr<DataModel>& source)
 Adds a data model as a source of data for the Gda::DataModelFilterSQL object.
const GdaDataModelFilterSQL* gobj () const
 Provides access to the underlying C GObject.
GdaDataModelFilterSQL* gobj ()
 Provides access to the underlying C GObject.
GdaDataModelFilterSQL* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool run ()
 Runs the query and fills in the Gda::DataModelFilterSQL object with the rows that matched the SQL command (which can be set with gda_data_model_filter_sql_set_sql) associated with this Gda::DataModelFilterSQL object.
void set_sql (const Glib::ustring& sql)
 Sets the SQL command to be used on the given Gda::DataModelFilterSQL object for filtering rows from the source data model (which is set with gda_data_model_filter_sql_set_source).
virtual ~DataModelFilterSQL ()

Static Public Member Functions

static Glib::RefPtr<DataModelFilterSQLcreate ()

Protected Member Functions

 DataModelFilterSQL ()

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gnome::Gda::DataModelFilterSQLwrap (GdaDataModelFilterSQL* object, bool take_copy=false)
 A Glib::wrap() method for this object.

Detailed Description

Filtering data from one or several DataModel objects.

This object implements simple SQL "SELECT" queries accessing data stored in various DataModel objects which it is instructed to use.


Constructor & Destructor Documentation

virtual Gnome::Gda::DataModelFilterSQL::~DataModelFilterSQL (  )  [virtual]

Gnome::Gda::DataModelFilterSQL::DataModelFilterSQL (  )  [protected]


Member Function Documentation

void Gnome::Gda::DataModelFilterSQL::add_source ( const Glib::ustring name,
const Glib::RefPtr<DataModel>&  source 
)

Adds a data model as a source of data for the Gda::DataModelFilterSQL object.

When the select object is run (via gda_data_model_filter_sql_run), it will parse the SQL and get the required data from the source data models.

Parameters:
name Name to identify the data model (usually a table name).
source A Gda::DataModel from which to get data.

static Glib::RefPtr<DataModelFilterSQL> Gnome::Gda::DataModelFilterSQL::create (  )  [static]

Reimplemented from Gnome::Gda::Object.

const GdaDataModelFilterSQL* Gnome::Gda::DataModelFilterSQL::gobj (  )  const [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::DataModelRow.

GdaDataModelFilterSQL* Gnome::Gda::DataModelFilterSQL::gobj (  )  [inline]

Provides access to the underlying C GObject.

Reimplemented from Gnome::Gda::DataModelRow.

GdaDataModelFilterSQL* Gnome::Gda::DataModelFilterSQL::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Reimplemented from Gnome::Gda::DataModelRow.

bool Gnome::Gda::DataModelFilterSQL::run (  ) 

Runs the query and fills in the Gda::DataModelFilterSQL object with the rows that matched the SQL command (which can be set with gda_data_model_filter_sql_set_sql) associated with this Gda::DataModelFilterSQL object.

After calling this function, if everything is successful, the Gda::DataModelFilterSQL object will contain the matched rows, which can then be accessed like a normal Gda::DataModel.

Returns:
true if successful, false if there was an error.

void Gnome::Gda::DataModelFilterSQL::set_sql ( const Glib::ustring sql  ) 

Sets the SQL command to be used on the given Gda::DataModelFilterSQL object for filtering rows from the source data model (which is set with gda_data_model_filter_sql_set_source).

Parameters:
sql The SQL command to be used for filtering rows.


Friends And Related Function Documentation

Glib::RefPtr<Gnome::Gda::DataModelFilterSQL> wrap ( GdaDataModelFilterSQL *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
object The C instance.
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:
Generated for libgdamm by Doxygen 1.5.1 © 1997-2001