GdaConnectionPool

Name

GdaConnectionPool -- Connection pools

Synopsis



GdaConnectionPool* gda_connection_pool_new  (void);
void        gda_connection_pool_free        (GdaConnectionPool *pool);
GdaConnection* gda_connection_pool_open_connection
                                            (GdaConnectionPool *pool,
                                             const gchar *gda_name,
                                             const gchar *username,
                                             const gchar *password);
void        gda_connection_pool_close_connection
                                            (GdaConnectionPool *pool,
                                             GdaConnection *cnc);
void        gda_connection_pool_close_all   (GdaConnectionPool *pool);
void        (*GdaConnectionPoolForeachFunc) (GdaConnectionPool *pool,
                                             GdaConnection *cnc,
                                             const gchar *gda_name,
                                             const gchar *username,
                                             const gchar *password,
                                             gpointer user_data);
void        gda_connection_pool_foreach     (GdaConnectionPool *pool,
                                             GdaConnectionPoolForeachFunc func,
                                             gpointer user_data);

Description

Details

gda_connection_pool_new ()

GdaConnectionPool* gda_connection_pool_new  (void);

Create a new GdaConnectionPool object, which is used to manage connection pools. These are very useful if you've got to manage several connections to different data sources

Returns :


gda_connection_pool_free ()

void        gda_connection_pool_free        (GdaConnectionPool *pool);

pool :


gda_connection_pool_open_connection ()

GdaConnection* gda_connection_pool_open_connection
                                            (GdaConnectionPool *pool,
                                             const gchar *gda_name,
                                             const gchar *username,
                                             const gchar *password);

pool :

a GdaConnectionPool object

gda_name :

GDA data source name

username :

user name

password :

password

Returns :


gda_connection_pool_close_connection ()

void        gda_connection_pool_close_connection
                                            (GdaConnectionPool *pool,
                                             GdaConnection *cnc);

Detach a client from the given connection in the specified pool. That is, it removes the reference from that client to the GdaConnection object. From each connection open, the GdaConnectionPool keeps a reference count, so that it knows always how many clients are using each of the GdaConnection objects being managed by the pool. This way, it does not actually close the connection until no clients are attached to it.

pool :

a GdaConnectionPool object

cnc :

a GdaConnection object


gda_connection_pool_close_all ()

void        gda_connection_pool_close_all   (GdaConnectionPool *pool);

pool :

a GdaConnectionPool object


GdaConnectionPoolForeachFunc ()

void        (*GdaConnectionPoolForeachFunc) (GdaConnectionPool *pool,
                                             GdaConnection *cnc,
                                             const gchar *gda_name,
                                             const gchar *username,
                                             const gchar *password,
                                             gpointer user_data);

pool :

cnc :

gda_name :

username :

password :

user_data :


gda_connection_pool_foreach ()

void        gda_connection_pool_foreach     (GdaConnectionPool *pool,
                                             GdaConnectionPoolForeachFunc func,
                                             gpointer user_data);

pool :

func :

user_data :