OCILIB (C and C++ Driver for Oracle)  4.0.0
Overview
Introduction
OCILIB++ is a C++ API for Oracle built on top of the C OCILIB API:
  • Full C API ported to C++
  • Implemented as a small set of header files, no library compilation needed
  • Based on C++ and STL paradigms (Strong typing, templates, containers, RAII, exception handling, operators, stack objects)
  • Based on design patterns (RAII, delegation, reference counting, smart pointers, proxies, singleton)
  • No user dynamic object allocation required
  • The only dependences are : STL and OCILIB C API
C++ language requirements
  • The OCILIB C++ API requires only C++03 features.
  • There are no dependencies on recent C++11 norm or C++14 draft.
Reference counting model
  • API usage is very simple, based on stack objects wrapping OCILIB handles using reference counting.
  • OCILIB handles are automatically allocated internally by C++ objects constructors or methods.
  • They are also automatically freed when the last C++ object referencing it goes out of scope.
  • Dynamic memory allocation is not required at all.
  • OCILIB++ allows simple and safe usage of Oracle client without the worries of memory leakages.
  • Using stack objects also makes error handling easier and program logic more robust
Exception model
  • Any failure occurring within an OCILIB C API call will throw a ocilib::Exception
  • For conformance reasons, this class derives from std::Exception
Warning
  • OCILIB++ wraps the whole OCILIB C API.
  • Each C OCILIB object handle has its C++ class counter part.
  • The whole OCILIB C Documentation (concepts, use cases, features and functionalities) is still valid for OCILIB++