cp_db_connection_pool_get_connection(3)

cp_dbms(3) cp_dbms cp_dbms(3)

NAME

cp_db_connection_pool_get_connection, cp_db_connection_pool_release_connection - retrieve / return a connection from a connection pool

SYNOPSIS

#include <cprops/db.h>

cp_db_connection * cp_db_connection_pool_get_connection(cp_db_connection_pool *pool);
void cp_db_connection_pool_release_connection(cp_db_connection_pool *pool, cp_db_connection *conn);

DESCRIPTION

cp_db_connection_pool_get_connection retrieves a connection from a connection pool. If the connection pool has no more connections available cp_db_connection_pool_get_connection either returns NULL, or blocks until a connection becomes available if the pool was set to block.

cp_db_connection_pool_release_connection returns a connection to the pool for reuse. Connections retrieved with cp_db_connection_pool_get_connection should not be closed explicitly.

RETURN VALUE

cp_db_connection_pool_create returns a cp_db_connection_pool structure representing the newly created connection pool on success or NULL on failure.

SEE ALSO

cp_db_connection_pool_set_blocking(3)

MARCH 2006 libcprops