23 #include "ocilibcpp/types.hpp"
42 connection.GetHandle()
48 AcquireTransient(pObject, parent);
77 Environment::GetEnvironmentHandle()
80 return TypeInfo(typeInfo, connection.GetHandle());
101 inline bool Object::Get<bool>(
const ostring& name)
const
107 inline short Object::Get<short>(
const ostring& name)
const
113 inline unsigned short Object::Get<unsigned short>(
const ostring& name)
const
119 inline int Object::Get<int>(
const ostring& name)
const
125 inline unsigned int Object::Get<unsigned int>(
const ostring& name)
const
137 inline big_uint Object::Get<big_uint>(
const ostring& name)
const
143 inline float Object::Get<float>(
const ostring& name)
const
149 inline double Object::Get<double>(
const ostring& name)
const
155 inline Number Object::Get<Number>(
const ostring& name)
const
167 inline Date Object::Get<Date>(
const ostring& name)
const
173 inline Timestamp Object::Get<Timestamp>(
const ostring& name)
const
179 inline Interval Object::Get<Interval>(
const ostring& name)
const
185 inline Object Object::Get<Object>(
const ostring& name)
const
191 inline Reference Object::Get<Reference>(
const ostring& name)
const
197 inline Clob Object::Get<Clob>(
const ostring& name)
const
203 inline NClob Object::Get<NClob>(
const ostring& name)
const
209 inline Blob Object::Get<Blob>(
const ostring& name)
const
215 inline File Object::Get<File>(
const ostring& name)
const
221 inline Raw Object::Get<Raw>(
const ostring& name)
const
225 core::ManagedBuffer<unsigned char> buffer(
static_cast<size_t>(size + 1));
239 inline void Object::Set<bool>(
const ostring& name,
const bool &value)
245 inline void Object::Set<short>(
const ostring& name,
const short &value)
251 inline void Object::Set<unsigned short>(
const ostring& name,
const unsigned short &value)
257 inline void Object::Set<int>(
const ostring& name,
const int &value)
263 inline void Object::Set<unsigned int>(
const ostring& name,
const unsigned int &value)
269 inline void Object::Set<big_int>(
const ostring& name,
const big_int &value)
275 inline void Object::Set<big_uint>(
const ostring& name,
const big_uint &value)
281 inline void Object::Set<float>(
const ostring& name,
const float &value)
287 inline void Object::Set<double>(
const ostring& name,
const double &value)
293 inline void Object::Set<Number>(
const ostring& name,
const Number &value)
299 inline void Object::Set<ostring>(
const ostring& name,
const ostring &value)
305 inline void Object::Set<Date>(
const ostring& name,
const Date &value)
311 inline void Object::Set<Timestamp>(
const ostring& name,
const Timestamp &value)
317 inline void Object::Set<Interval>(
const ostring& name,
const Interval &value)
323 inline void Object::Set<Object>(
const ostring& name,
const Object &value)
329 inline void Object::Set<Reference>(
const ostring& name,
const Reference &value)
335 inline void Object::Set<Clob>(
const ostring& name,
const Clob &value)
341 inline void Object::Set<NClob>(
const ostring& name,
const NClob &value)
347 inline void Object::Set<Blob>(
const ostring& name,
const Blob &value)
353 inline void Object::Set<File>(
const ostring& name,
const File &value)
359 inline void Object::Set<Raw>(
const ostring& name,
const Raw &value)
361 const AnyPointer data = value.empty() ? nullptr :
static_cast<AnyPointer>(
const_cast<Raw::value_type*
>(&value[0])) ;
377 unsigned int len = 0;
385 return core::MakeString(
static_cast<const otext *
>(buffer),
static_cast<int>(len));
388 return OCI_STRING_NULL;
A connection or session with a specific database.
Object identifying the SQL data type OBJECT.
void Set(const ostring &name, const T &value)
Set the given object attribute value.
T Get(const ostring &name) const
Return the given object attribute value.
ostring ToString() const override
return a string representation of the current object
Reference GetReference() const
Creates a reference on the current object.
Object Clone() const
Clone the current instance to a new one performing deep copy.
core::Enum< ObjectTypeValues > ObjectType
Object Type.
bool IsAttributeNull(const ostring &name) const
Check if an object attribute is null.
Object()
Create an empty null Object instance.
TypeInfo GetTypeInfo() const
Return the TypeInfo object describing the object.
ObjectType GetType() const
Return the type of the given object.
void SetAttributeNull(const ostring &name)
Set the given object attribute to null.
Object identifying the SQL data type REF.
Provides type information on Oracle Database objects.
Connection GetConnection() const
Return the connection associated with a statement.
Template Enumeration template class providing some type safety to some extends for manipulating enume...
Internal usage. Interface for handling ownership and relationship of a C API handle.
Internal usage. Provide a buffer class with RAII capabilities.
struct OCI_Ref OCI_Ref
Oracle REF type representation.
struct OCI_Object OCI_Object
Oracle Named types representation.
long long big_int
big_int is a C scalar integer (32 or 64 bits) depending on compiler support for 64bits integers....
struct OCI_TypeInfo OCI_TypeInfo
Type info metadata handle.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectToText(OCI_Object *obj, unsigned int *size, otext *str)
Convert an object handle value to a string.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetInterval(OCI_Object *obj, const otext *attr, OCI_Interval *value)
Set an object attribute of type Interval.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetRaw(OCI_Object *obj, const otext *attr, void *value, unsigned int len)
Set an object attribute of type RAW.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetString(OCI_Object *obj, const otext *attr, const otext *value)
Set an object attribute of type string.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectIsNull(OCI_Object *obj, const otext *attr)
Check if an object attribute is null.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetDouble(OCI_Object *obj, const otext *attr, double value)
Set an object attribute of type double.
OCI_SYM_PUBLIC int OCI_API OCI_ObjectGetInt(OCI_Object *obj, const otext *attr)
Return the integer value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetInt(OCI_Object *obj, const otext *attr, int value)
Set an object attribute of type int.
OCI_SYM_PUBLIC OCI_Coll *OCI_API OCI_ObjectGetColl(OCI_Object *obj, const otext *attr)
Return the collection value of the given object attribute.
OCI_SYM_PUBLIC OCI_TypeInfo *OCI_API OCI_ObjectGetTypeInfo(OCI_Object *obj)
Return the type info object associated to the object.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetColl(OCI_Object *obj, const otext *attr, OCI_Coll *value)
Set an object attribute of type Collection.
OCI_SYM_PUBLIC OCI_Timestamp *OCI_API OCI_ObjectGetTimestamp(OCI_Object *obj, const otext *attr)
Return the timestamp value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetObject(OCI_Object *obj, const otext *attr, OCI_Object *value)
Set an object attribute of type Object.
OCI_SYM_PUBLIC OCI_Ref *OCI_API OCI_RefCreate(OCI_Connection *con, OCI_TypeInfo *typinf)
Create a local Ref instance.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetShort(OCI_Object *obj, const otext *attr, short value)
Set an object attribute of type short.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetUnsignedShort(OCI_Object *obj, const otext *attr, unsigned short value)
Set an object attribute of type unsigned short.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_ObjectGetType(OCI_Object *obj)
Return the type of an object instance.
OCI_SYM_PUBLIC OCI_File *OCI_API OCI_ObjectGetFile(OCI_Object *obj, const otext *attr)
Return the file value of the given object attribute.
OCI_SYM_PUBLIC big_uint OCI_API OCI_ObjectGetUnsignedBigInt(OCI_Object *obj, const otext *attr)
Return the unsigned big integer value of the given object attribute.
OCI_SYM_PUBLIC float OCI_API OCI_ObjectGetFloat(OCI_Object *obj, const otext *attr)
Return the float value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectAssign(OCI_Object *obj, OCI_Object *obj_src)
Assign an object to another one.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetDate(OCI_Object *obj, const otext *attr, OCI_Date *value)
Set an object attribute of type Date.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetFile(OCI_Object *obj, const otext *attr, OCI_File *value)
Set an object attribute of type File.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetBigInt(OCI_Object *obj, const otext *attr, big_int value)
Set an object attribute of type big int.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetNull(OCI_Object *obj, const otext *attr)
Set an object attribute to null.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetNumber(OCI_Object *obj, const otext *attr, OCI_Number *value)
Set an object attribute of type number.
OCI_SYM_PUBLIC big_int OCI_API OCI_ObjectGetBigInt(OCI_Object *obj, const otext *attr)
Return the big integer value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectGetBoolean(OCI_Object *obj, const otext *attr)
Return the boolean value of the given object attribute (ONLY for PL/SQL records)
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectGetSelfRef(OCI_Object *obj, OCI_Ref *ref)
Retrieve an Oracle Ref handle from an object and assign it to the given OCILIB OCI_Ref handle.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_ObjectGetUnsignedInt(OCI_Object *obj, const otext *attr)
Return the unsigned integer value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetBoolean(OCI_Object *obj, const otext *attr, boolean value)
Set an object attribute of type boolean (ONLY for PL/SQL records)
OCI_SYM_PUBLIC OCI_Lob *OCI_API OCI_ObjectGetLob(OCI_Object *obj, const otext *attr)
Return the lob value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetRef(OCI_Object *obj, const otext *attr, OCI_Ref *value)
Set an object attribute of type Ref.
OCI_SYM_PUBLIC unsigned short OCI_API OCI_ObjectGetUnsignedShort(OCI_Object *obj, const otext *attr)
Return the unsigned short value of the given object attribute.
OCI_SYM_PUBLIC int OCI_API OCI_ObjectGetRaw(OCI_Object *obj, const otext *attr, void *value, unsigned int len)
Return the raw attribute value of the given object attribute into the given buffer.
OCI_SYM_PUBLIC const otext *OCI_API OCI_ObjectGetString(OCI_Object *obj, const otext *attr)
Return the string value of the given object attribute.
OCI_SYM_PUBLIC OCI_Object *OCI_API OCI_ObjectGetObject(OCI_Object *obj, const otext *attr)
Return the object value of the given object attribute.
OCI_SYM_PUBLIC OCI_Ref *OCI_API OCI_ObjectGetRef(OCI_Object *obj, const otext *attr)
Return the Ref value of the given object attribute.
OCI_SYM_PUBLIC OCI_Number *OCI_API OCI_ObjectGetNumber(OCI_Object *obj, const otext *attr)
Return the number value of the given object attribute.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_ObjectGetRawSize(OCI_Object *obj, const otext *attr)
Return the raw attribute value size of the given object attribute into the given buffer.
OCI_SYM_PUBLIC double OCI_API OCI_ObjectGetDouble(OCI_Object *obj, const otext *attr)
Return the double value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetUnsignedInt(OCI_Object *obj, const otext *attr, unsigned int value)
Set an object attribute of type unsigned int.
OCI_SYM_PUBLIC OCI_Interval *OCI_API OCI_ObjectGetInterval(OCI_Object *obj, const otext *attr)
Return the interval value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetUnsignedBigInt(OCI_Object *obj, const otext *attr, big_uint value)
Set an object attribute of type unsigned big int.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetTimestamp(OCI_Object *obj, const otext *attr, OCI_Timestamp *value)
Set an object attribute of type Timestamp.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetFloat(OCI_Object *obj, const otext *attr, float value)
Set an object attribute of type float.
OCI_SYM_PUBLIC OCI_Object *OCI_API OCI_ObjectCreate(OCI_Connection *con, OCI_TypeInfo *typinf)
Create a local object instance.
OCI_SYM_PUBLIC short OCI_API OCI_ObjectGetShort(OCI_Object *obj, const otext *attr)
Return the short value of the given object attribute.
OCI_SYM_PUBLIC OCI_Date *OCI_API OCI_ObjectGetDate(OCI_Object *obj, const otext *attr)
Return the date value of the given object attribute.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetLob(OCI_Object *obj, const otext *attr, OCI_Lob *value)
Set an object attribute of type Lob.
static T Check(T result)
Internal usage. Checks if the last OCILIB function call has raised an error. If so,...
ostring MakeString(const otext *result, int size=-1)
Internal usage. Constructs a C++ string object from the given OCILIB string pointer.
Raw MakeRaw(AnyPointer result, unsigned int size)
Internal usage. Constructs a C++ Raw object from the given OCILIB raw buffer.
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 )
Lob< ostring, LobNationalCharacter > NClob
Class handling NCLOB oracle type.
Lob< ostring, LobCharacter > Clob
Class handling CLOB oracle type.
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
void * AnyPointer
Alias for the generic void pointer.
Lob< Raw, LobBinary > Blob
Class handling BLOB oracle type.