struct GskDbhClass

struct _GskDbhClass {
                                               object_class;
                          (* connect)
                               (GskDbh                * dbh,
                                GskDbiDataSource      * data_source,
                                const gchar           * username,
                                const gchar           * password,
                                GskDbhConnectCallback callback,
                                gpointer             callback_data);
     *                    (* escape_string)
                               (GskDbh                * dbh,
                                gconstpointer        src,
                                guint                len);
                          (* query)
                               (GskDbh                * dbh,
                                const gchar           * query,
                                GskDbhQueryCallback  callback,
                                gpointer             callback_data);
};
Base class for database handles.

Methods:

connect

                          (* connect)
                               (GskDbh                * dbh,
                                GskDbiDataSource      * data_source,
                                const gchar           * username,
                                const gchar           * password,
                                GskDbhConnectCallback callback,
                                gpointer             callback_data);
      
Connect to a datasource. Implementations can assume main loop has been set before connect virtual is called. Additionally, the connect virtual will never be called twice for the same handle.

GskDbh * dbh

The handle to connect.

GskDbiDataSource * data_source

The datasource to connect to.

const gchar * username

The username for authentication.

const gchar * password

The password for authentication.

GskDbhConnectCallback callback

Callback to execute on completion.

gpointer callback_data

Data passed unmodified to callback.

escape_string

     *                    (* escape_string)
                               (GskDbh                * dbh,
                                gconstpointer        src,
                                guint                len);
      
Escape a string for use in a query.

GskDbh * dbh

The database handle to escape the string.

gconstpointer src

The data to escape (not necessarily null terminated).

guint len

The length (in bytes) of the data to escape.

query

                          (* query)
                               (GskDbh                * dbh,
                                const gchar           * query,
                                GskDbhQueryCallback  callback,
                                gpointer             callback_data);
      
Execute a single query. Implementations can assume connect virtual has been called before any query virtuals are called. In addition, implementations can assume query virtual will not be called again until query callback is executed, i.e., base implementation manages the query queue.

GskDbh * dbh

The database handle to execute the query.

const gchar * query

The (null terminated) query string.

GskDbhQueryCallback callback

Callback to execute on completion.

gpointer callback_data

Data passed unmodified to callback.

Members:

object_class

Parent class.