29#include <sptk5/db/PoolDatabaseConnection.h>
47class OracleEnvironment
53 OracleEnvironment() =
default;
58 OracleEnvironment(
const OracleEnvironment&) =
delete;
63 OracleEnvironment(OracleEnvironment&&) =
default;
68 OracleEnvironment& operator=(
const OracleEnvironment&) =
delete;
73 OracleEnvironment& operator=(OracleEnvironment&&) =
default;
78 oracle::occi::Environment* handle()
const
80 return m_handle.get();
86 static String clientVersion();
92 oracle::occi::Connection* createConnection(
const DatabaseConnectionString& connectionString);
98 void terminateConnection(oracle::occi::Connection* connection)
const;
104 std::shared_ptr<oracle::occi::Environment> m_handle {
105 std::shared_ptr<oracle::occi::Environment>(
106 oracle::occi::Environment::createEnvironment(
"UTF8",
"UTF8", oracle::occi::Environment::THREADED_MUTEXED),
107 [](oracle::occi::Environment* handle) {
108 oracle::occi::Environment::terminateEnvironment(handle);