![]() | ![]() | ![]() | libgda API reference | ![]() |
---|
GdaConnectionPool* gda_connection_pool_new (void); void gda_connection_pool_free (GdaConnectionPool *pool); GdaConnection* gda_connection_pool_open_connection (GdaConnectionPool *pool, constgchar *gda_name, constgchar *username, constgchar *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, constgchar *gda_name, constgchar *username, constgchar *password,gpointer user_data); void gda_connection_pool_foreach (GdaConnectionPool *pool, GdaConnectionPoolForeachFunc func,gpointer user_data);
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 : |
|
GdaConnection* gda_connection_pool_open_connection (GdaConnectionPool *pool, constgchar *gda_name, constgchar *username, constgchar *password);
pool : | a GdaConnectionPool object |
gda_name : | GDA data source name |
username : | user name |
password : | password |
Returns : |
|
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 |
void gda_connection_pool_close_all (GdaConnectionPool *pool);
pool : | a GdaConnectionPool object |
void (*GdaConnectionPoolForeachFunc) (GdaConnectionPool *pool, GdaConnection *cnc, constgchar *gda_name, constgchar *username, constgchar *password,gpointer user_data);
pool : | |
cnc : | |
gda_name : | |
username : | |
password : | |
user_data : |
|
void gda_connection_pool_foreach (GdaConnectionPool *pool, GdaConnectionPoolForeachFunc func,gpointer user_data);
pool : | |
func : | |
user_data : |
|
<<< GdaCommand | GdaConnection >>> |