Misc API

Misc API — Methods dedicated to implementing providers

Synopsis

GdaSqlParser*       gda_server_provider_internal_get_parser
                                                        (GdaServerProvider *prov);

gboolean            gda_server_provider_perform_operation_default
                                                        (GdaServerProvider *provider,
                                                         GdaConnection *cnc,
                                                         GdaServerOperation *op,
                                                         GError **error);
GdaDataHandler*     gda_server_provider_get_data_handler_default
                                                        (GdaServerProvider *provider,
                                                         GdaConnection *cnc,
                                                         GType type,
                                                         const gchar *dbms_type);

GdaDataHandler*     gda_server_provider_handler_find    (GdaServerProvider *prov,
                                                         GdaConnection *cnc,
                                                         GType g_type,
                                                         const gchar *dbms_type);
void                gda_server_provider_handler_declare (GdaServerProvider *prov,
                                                         GdaDataHandler *dh,
                                                         GdaConnection *cnc,
                                                         GType g_type,
                                                         const gchar *dbms_type);

gchar*              gda_server_provider_find_file       (GdaServerProvider *prov,
                                                         const gchar *inst_dir,
                                                         const gchar *filename);
gchar*              gda_server_provider_load_file_contents
                                                        (const gchar *inst_dir,
                                                         const gchar *data_dir,
                                                         const gchar *filename);

void                gda_connection_internal_set_provider_data
                                                        (GdaConnection *cnc,
                                                         gpointer data,
                                                         GDestroyNotify destroy_func);
gpointer            gda_connection_internal_get_provider_data
                                                        (GdaConnection *cnc);
void                gda_virtual_connection_internal_set_provider_data
                                                        (GdaVirtualConnection *vcnc,
                                                         gpointer data,
                                                         GDestroyNotify destroy_func);
gpointer            gda_virtual_connection_internal_get_provider_data
                                                        (GdaVirtualConnection *cnc);

void                gda_connection_add_prepared_statement
                                                        (GdaConnection *cnc,
                                                         GdaStatement *gda_stmt,
                                                         gpointer prepared_stmt);
void                gda_connection_del_prepared_statement
                                                        (GdaConnection *cnc,
                                                         GdaStatement *gda_stmt);
gpointer            gda_connection_get_prepared_statement
                                                        (GdaConnection *cnc,
                                                         GdaStatement *gda_stmt);

void                gda_connection_internal_transaction_started
                                                        (GdaConnection *cnc,
                                                         const gchar *parent_trans,
                                                         const gchar *trans_name,
                                                         GdaTransactionIsolation isol_level);
void                gda_connection_internal_transaction_rolledback
                                                        (GdaConnection *cnc,
                                                         const gchar *trans_name);
void                gda_connection_internal_transaction_committed
                                                        (GdaConnection *cnc,
                                                         const gchar *trans_name);
void                gda_connection_internal_statement_executed
                                                        (GdaConnection *cnc,
                                                         GdaStatement *stmt,
                                                         GdaSet *params,
                                                         GdaConnectionEvent *error);
void                gda_connection_internal_savepoint_added
                                                        (GdaConnection *cnc,
                                                         const gchar *parent_trans,
                                                         const gchar *svp_name);
void                gda_connection_internal_savepoint_rolledback
                                                        (GdaConnection *cnc,
                                                         const gchar *svp_name);
void                gda_connection_internal_savepoint_removed
                                                        (GdaConnection *cnc,
                                                         const gchar *svp_name);
void                gda_connection_internal_change_transaction_state
                                                        (GdaConnection *cnc,
                                                         GdaTransactionStatusState newstate);

Description

The methods mentionned in this section are reserved for database providers implementatins and should not bu used by developers outside that scope.

Details

gda_server_provider_internal_get_parser ()

GdaSqlParser*       gda_server_provider_internal_get_parser
                                                        (GdaServerProvider *prov);

This is a factory method to get a unique instance of a GdaSqlParser object for each GdaServerProvider object Don't unref() it.

prov :

Returns :

a GdaSqlParser

gda_server_provider_perform_operation_default ()

gboolean            gda_server_provider_perform_operation_default
                                                        (GdaServerProvider *provider,
                                                         GdaConnection *cnc,
                                                         GdaServerOperation *op,
                                                         GError **error);

Performs the operation described by op, using the SQL from the rendering of the operation

provider :

a GdaServerProvider object

cnc :

a GdaConnection object which will be used to perform an action, or NULL

op :

a GdaServerOperation object

error :

a place to store an error, or NULL

Returns :

TRUE if no error occurred

gda_server_provider_get_data_handler_default ()

GdaDataHandler*     gda_server_provider_get_data_handler_default
                                                        (GdaServerProvider *provider,
                                                         GdaConnection *cnc,
                                                         GType type,
                                                         const gchar *dbms_type);

Provides the implementation when the default Libgda's data handlers must be used

provider :

a server provider.

cnc :

a GdaConnection object, or NULL

type :

dbms_type :

a DBMS type definition

Returns :

a GdaDataHandler, or NULL

gda_server_provider_handler_find ()

GdaDataHandler*     gda_server_provider_handler_find    (GdaServerProvider *prov,
                                                         GdaConnection *cnc,
                                                         GType g_type,
                                                         const gchar *dbms_type);

prov :

cnc :

g_type :

dbms_type :

Returns :


gda_server_provider_handler_declare ()

void                gda_server_provider_handler_declare (GdaServerProvider *prov,
                                                         GdaDataHandler *dh,
                                                         GdaConnection *cnc,
                                                         GType g_type,
                                                         const gchar *dbms_type);

prov :

dh :

cnc :

g_type :

dbms_type :


gda_server_provider_find_file ()

gchar*              gda_server_provider_find_file       (GdaServerProvider *prov,
                                                         const gchar *inst_dir,
                                                         const gchar *filename);

prov :

inst_dir :

filename :

Returns :


gda_server_provider_load_file_contents ()

gchar*              gda_server_provider_load_file_contents
                                                        (const gchar *inst_dir,
                                                         const gchar *data_dir,
                                                         const gchar *filename);

inst_dir :

data_dir :

filename :

Returns :


gda_connection_internal_set_provider_data ()

void                gda_connection_internal_set_provider_data
                                                        (GdaConnection *cnc,
                                                         gpointer data,
                                                         GDestroyNotify destroy_func);

Note: calling this function more than once will not make it call destroy_func on any previously set opaque data, you'll have to do it yourself.

cnc :

a GdaConnection object

data :

an opaque structure, known only to the provider for which cnc is opened

destroy_func :

function to call when the connection closes and data needs to be destroyed

gda_connection_internal_get_provider_data ()

gpointer            gda_connection_internal_get_provider_data
                                                        (GdaConnection *cnc);

Get the opaque pointer previously set using gda_connection_internal_set_provider_data(). If it's not set, then add a connection event and returns NULL

cnc :

a GdaConnection object

Returns :

the pointer to the opaque structure set using gda_connection_internal_set_provider_data()

gda_virtual_connection_internal_set_provider_data ()

void                gda_virtual_connection_internal_set_provider_data
                                                        (GdaVirtualConnection *vcnc,
                                                         gpointer data,
                                                         GDestroyNotify destroy_func);

Note: calling this function more than once will not make it call destroy_func on any previously set opaque data, you'll have to do it yourself.

vcnc :

data :

destroy_func :


gda_virtual_connection_internal_get_provider_data ()

gpointer            gda_virtual_connection_internal_get_provider_data
                                                        (GdaVirtualConnection *cnc);

Get the opaque pointer previously set using gda_virtual_connection_internal_set_provider_data(). If it's not set, then add a connection event and returns NULL

cnc :

Returns :


gda_connection_add_prepared_statement ()

void                gda_connection_add_prepared_statement
                                                        (GdaConnection *cnc,
                                                         GdaStatement *gda_stmt,
                                                         gpointer prepared_stmt);

cnc :

gda_stmt :

prepared_stmt :


gda_connection_del_prepared_statement ()

void                gda_connection_del_prepared_statement
                                                        (GdaConnection *cnc,
                                                         GdaStatement *gda_stmt);

cnc :

gda_stmt :


gda_connection_get_prepared_statement ()

gpointer            gda_connection_get_prepared_statement
                                                        (GdaConnection *cnc,
                                                         GdaStatement *gda_stmt);

cnc :

gda_stmt :

Returns :


gda_connection_internal_transaction_started ()

void                gda_connection_internal_transaction_started
                                                        (GdaConnection *cnc,
                                                         const gchar *parent_trans,
                                                         const gchar *trans_name,
                                                         GdaTransactionIsolation isol_level);

cnc :

parent_trans :

trans_name :

isol_level :


gda_connection_internal_transaction_rolledback ()

void                gda_connection_internal_transaction_rolledback
                                                        (GdaConnection *cnc,
                                                         const gchar *trans_name);

cnc :

trans_name :


gda_connection_internal_transaction_committed ()

void                gda_connection_internal_transaction_committed
                                                        (GdaConnection *cnc,
                                                         const gchar *trans_name);

cnc :

trans_name :


gda_connection_internal_statement_executed ()

void                gda_connection_internal_statement_executed
                                                        (GdaConnection *cnc,
                                                         GdaStatement *stmt,
                                                         GdaSet *params,
                                                         GdaConnectionEvent *error);

cnc :

stmt :

params :

error :


gda_connection_internal_savepoint_added ()

void                gda_connection_internal_savepoint_added
                                                        (GdaConnection *cnc,
                                                         const gchar *parent_trans,
                                                         const gchar *svp_name);

cnc :

parent_trans :

svp_name :


gda_connection_internal_savepoint_rolledback ()

void                gda_connection_internal_savepoint_rolledback
                                                        (GdaConnection *cnc,
                                                         const gchar *svp_name);

cnc :

svp_name :


gda_connection_internal_savepoint_removed ()

void                gda_connection_internal_savepoint_removed
                                                        (GdaConnection *cnc,
                                                         const gchar *svp_name);

cnc :

svp_name :


gda_connection_internal_change_transaction_state ()

void                gda_connection_internal_change_transaction_state
                                                        (GdaConnection *cnc,
                                                         GdaTransactionStatusState newstate);

cnc :

newstate :