diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-02-01 15:47:37 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-02-01 15:47:37 +0300 |
commit | 62e234c114d2b6ead93a1d39593c66b648c3d0a6 (patch) | |
tree | ce6740b4508eb29400490b20efc8e100e38a7b7f /libodb-oracle/odb/oracle/auto-handle.cxx | |
parent | 9072842a023c4b65ecb141292c4b63417fee1b98 (diff) |
Turn libodb-oracle repository into package for muti-package repositorylibodb-oracle
Diffstat (limited to 'libodb-oracle/odb/oracle/auto-handle.cxx')
-rw-r--r-- | libodb-oracle/odb/oracle/auto-handle.cxx | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libodb-oracle/odb/oracle/auto-handle.cxx b/libodb-oracle/odb/oracle/auto-handle.cxx new file mode 100644 index 0000000..55614d4 --- /dev/null +++ b/libodb-oracle/odb/oracle/auto-handle.cxx @@ -0,0 +1,37 @@ +// file : odb/oracle/auto-handle.cxx +// license : ODB NCUEL; see accompanying LICENSE file + +#include <oci.h> + +#include <odb/oracle/auto-handle.hxx> + +namespace odb +{ + namespace oracle + { + void + oci_handle_free (void* h, ub4 t) + { + OCIHandleFree (h, t); + } + + void handle_traits<OCISvcCtx>:: + release (OCISvcCtx* h, OCIError* e) + { + OCISessionRelease (h, e, 0, 0, OCI_DEFAULT); + } + + void handle_traits<OCIStmt>:: + release (OCIStmt* h, ub4 m, OCIError* e) + { + OCIStmtRelease (h, e, 0, 0, m); + } + + const ub4 handle_type_traits<OCIEnv>::htype = OCI_HTYPE_ENV; + const ub4 handle_type_traits<OCIError>::htype = OCI_HTYPE_ERROR; + const ub4 handle_type_traits<OCISvcCtx>::htype = OCI_HTYPE_SVCCTX; + const ub4 handle_type_traits<OCIStmt>::htype = OCI_HTYPE_STMT; + const ub4 handle_type_traits<OCIAuthInfo>::htype = OCI_HTYPE_AUTHINFO; + const ub4 handle_type_traits<OCITrans>::htype = OCI_HTYPE_TRANS; + } +} |