aboutsummaryrefslogtreecommitdiff
path: root/odb/oracle/auto-handle.cxx
blob: 8162b86b9b11cba3dd37d4d910a063de6bfe6ccd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// file      : odb/oracle/auto-handle.cxx
// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
// 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;
  }
}