23 #include "ocilibcpp/support.hpp" 30 void BindTypeAdaptor<T>::SetInData()
32 if (GetMode() & OCI_BDM_IN)
34 *_data =
static_cast<NativeType
>(_object);
39 void BindTypeAdaptor<T>::SetOutData()
41 if (GetMode() & OCI_BDM_OUT)
43 _object =
static_cast<T&
>(*_data);
48 BindTypeAdaptor<T>::BindTypeAdaptor(
const ocilib::Statement& statement,
const ostring& name,
unsigned int mode, ObjectType&
object) :
49 BindObject(statement, name, mode),
51 _data(core::OnAllocate(new NativeType))
57 BindTypeAdaptor<T>::~BindTypeAdaptor() noexcept
59 delete core::OnDeallocate(_data);
63 BindTypeAdaptor<T>::operator NativeType* ()
const 69 inline void BindTypeAdaptor<bool>::SetInData()
71 if (GetMode() & OCI_BDM_IN)
73 *_data = (_object ==
true);
78 inline void BindTypeAdaptor<bool>::SetOutData()
80 if (GetMode() & OCI_BDM_OUT)
82 _object = (*_data == TRUE);
Object used for executing SQL or PL/SQL statement and returning the produced results.
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 ) ...