23 #include "ocilibcpp/types.hpp"
40 Open(db, user, pwd, poolType, minSize, maxSize, increment, sessionFlags);
52 OCI_PoolCreate(db.c_str(), user.c_str(), pwd.c_str(), poolType, sessionFlags.GetValues(), minSize, maxSize, increment)
54 Environment::GetEnvironmentHandle()
A connection or session with a specific database.
unsigned int GetMinSize() const
Return the minimum number of connections/sessions that can be opened to the database.
Connection GetConnection(const ostring &sessionTag=OTEXT(""))
Get a connection from the pool.
bool GetNoWait() const
Get the waiting mode used when no more connections/sessions are available from the pool.
unsigned int GetTimeout() const
Get the idle timeout for connections/sessions in the pool.
unsigned int GetIncrement() const
Return the increment for connections/sessions to be opened to the database when the pool is not full.
void SetNoWait(bool value)
Set the waiting mode used when no more connections/sessions are available from the pool.
unsigned int GetStatementCacheSize() const
Return the maximum number of statements to keep in the pool's statement cache.
unsigned int GetBusyConnectionsCount() const
Return the current number of busy connections/sessions.
void Open(const ostring &db, const ostring &user, const ostring &pwd, Pool::PoolType poolType, unsigned int minSize, unsigned int maxSize, unsigned int increment=1, Environment::SessionFlags sessionFlags=Environment::SessionDefault)
Create an Oracle pool of connections or sessions.
void Close()
Destroy the current Oracle pool of connections or sessions.
unsigned int GetOpenedConnectionsCount() const
Return the current number of opened connections/sessions.
unsigned int GetMaxSize() const
Return the maximum number of connections/sessions that can be opened to the database.
Pool()
Default constructor.
void SetTimeout(unsigned int value)
Set the connections/sessions idle timeout.
void SetStatementCacheSize(unsigned int value)
Set the maximum number of statements to keep in the pool's statement cache.
Template Enumeration template class providing some type safety to some extends for manipulating enume...
Template Flags template class providing some type safety to some extends for manipulating flags set v...
OCI_SYM_PUBLIC unsigned int OCI_API OCI_PoolGetBusyCount(OCI_Pool *pool)
Return the current number of busy connections/sessions.
OCI_SYM_PUBLIC OCI_Connection *OCI_API OCI_PoolGetConnection(OCI_Pool *pool, const otext *tag)
Get a connection from the pool.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_PoolGetIncrement(OCI_Pool *pool)
Return the increment for connections/sessions to be opened to the database when the pool is not full.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_PoolGetStatementCacheSize(OCI_Pool *pool)
Return the maximum number of statements to keep in the pool statement cache.
OCI_SYM_PUBLIC boolean OCI_API OCI_PoolSetStatementCacheSize(OCI_Pool *pool, unsigned int value)
Set the maximum number of statements to keep in the pool statement cache.
OCI_SYM_PUBLIC boolean OCI_API OCI_PoolSetNoWait(OCI_Pool *pool, boolean value)
Set the waiting mode used when no more connections/sessions are available from the pool.
OCI_SYM_PUBLIC boolean OCI_API OCI_PoolSetTimeout(OCI_Pool *pool, unsigned int value)
Set the connections/sessions idle timeout.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_PoolGetOpenedCount(OCI_Pool *pool)
Return the current number of opened connections/sessions.
OCI_SYM_PUBLIC OCI_Pool *OCI_API OCI_PoolCreate(const otext *db, const otext *user, const otext *pwd, unsigned int type, unsigned int mode, unsigned int min_con, unsigned int max_con, unsigned int incr_con)
Create an Oracle pool of connections or sessions.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_PoolGetMax(OCI_Pool *pool)
Return the maximum number of connections/sessions that can be opened to the database.
OCI_SYM_PUBLIC boolean OCI_API OCI_PoolGetNoWait(OCI_Pool *pool)
Get the waiting mode used when no more connections/sessions are available from the pool.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_PoolGetTimeout(OCI_Pool *pool)
Get the idle timeout for connections/sessions in the pool.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_PoolGetMin(OCI_Pool *pool)
Return the minimum number of connections/sessions that can be opened to the database.
static T Check(T result)
Internal usage. Checks if the last OCILIB function call has raised an error. If so,...
std::basic_string< otext, std::char_traits< otext >, std::allocator< otext > > ostring
string class wrapping the OCILIB otext * type and OTEXT() macros ( see Character sets )