23 #include "ocilibcpp/types.hpp" 44 Acquire(pObject,
nullptr,
nullptr, parent);
89 inline bool Object::Get<bool>(
const ostring& name)
const 95 inline short Object::Get<short>(
const ostring& name)
const 101 inline unsigned short Object::Get<unsigned short>(
const ostring& name)
const 107 inline int Object::Get<int>(
const ostring& name)
const 113 inline unsigned int Object::Get<unsigned int>(
const ostring& name)
const 125 inline big_uint Object::Get<big_uint>(
const ostring& name)
const 131 inline float Object::Get<float>(
const ostring& name)
const 137 inline double Object::Get<double>(
const ostring& name)
const 155 inline Date Object::Get<Date>(
const ostring& name)
const 185 inline Clob Object::Get<Clob>(
const ostring& name)
const 191 inline NClob Object::Get<NClob>(
const ostring& name)
const 197 inline Blob Object::Get<Blob>(
const ostring& name)
const 203 inline File Object::Get<File>(
const ostring& name)
const 209 inline Raw Object::Get<Raw>(
const ostring& name)
const 227 inline void Object::Set<bool>(
const ostring& name,
const bool &value)
233 inline void Object::Set<short>(
const ostring& name,
const short &value)
239 inline void Object::Set<unsigned short>(
const ostring& name,
const unsigned short &value)
245 inline void Object::Set<int>(
const ostring& name,
const int &value)
251 inline void Object::Set<unsigned int>(
const ostring& name,
const unsigned int &value)
257 inline void Object::Set<big_int>(
const ostring& name,
const big_int &value)
263 inline void Object::Set<big_uint>(
const ostring& name,
const big_uint &value)
269 inline void Object::Set<float>(
const ostring& name,
const float &value)
275 inline void Object::Set<double>(
const ostring& name,
const double &value)
281 inline void Object::Set<Number>(
const ostring& name,
const Number &value)
287 inline void Object::Set<ostring>(
const ostring& name,
const ostring &value)
293 inline void Object::Set<Date>(
const ostring& name,
const Date &value)
299 inline void Object::Set<Timestamp>(
const ostring& name,
const Timestamp &value)
305 inline void Object::Set<Interval>(
const ostring& name,
const Interval &value)
311 inline void Object::Set<Object>(
const ostring& name,
const Object &value)
317 inline void Object::Set<Reference>(
const ostring& name,
const Reference &value)
323 inline void Object::Set<Clob>(
const ostring& name,
const Clob &value)
329 inline void Object::Set<NClob>(
const ostring& name,
const NClob &value)
335 inline void Object::Set<Blob>(
const ostring& name,
const Blob &value)
341 inline void Object::Set<File>(
const ostring& name,
const File &value)
347 inline void Object::Set<Raw>(
const ostring& name,
const Raw &value)
349 const AnyPointer data = value.empty() ? nullptr :
static_cast<AnyPointer>(
const_cast<Raw::value_type*
>(&value[0])) ;
365 unsigned int len = 0;
373 return core::MakeString(static_cast<const otext *>(buffer), static_cast<int>(len));
376 return OCI_STRING_NULL;
Object()
Create an empty null Object instance.
Lob< Raw, LobBinary > Blob
Class handling BLOB oracle type.
long long big_int
big_int is a C scalar integer (32 or 64 bits) depending on compiler support for 64bits integers...
Internal usage. Interface for handling ownership and relationship of a C API handle.
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 OCI_Object *OCI_API OCI_ObjectCreate(OCI_Connection *con, OCI_TypeInfo *typinf)
Create a local object instance.
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 OCI_Lob *OCI_API OCI_ObjectGetLob(OCI_Object *obj, const otext *attr)
Return the lob value of the given object attribute.
Object Clone() const
Clone the current instance to a new one performing deep copy.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetDate(OCI_Object *obj, const otext *attr, OCI_Date *value)
Set an object attribute of type Date.
Raw MakeRaw(AnyPointer result, unsigned int size)
Internal usage. Constructs a C++ Raw object from the given OCILIB raw buffer.
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 float OCI_API OCI_ObjectGetFloat(OCI_Object *obj, const otext *attr)
Return the float value of the given object attribute.
OCI_SYM_PUBLIC double OCI_API OCI_ObjectGetDouble(OCI_Object *obj, const otext *attr)
Return the double value of the given object attribute.
A connection or session with a specific database.
OCI_SYM_PUBLIC int OCI_API OCI_ObjectGetInt(OCI_Object *obj, const otext *attr)
Return the integer value of the given object attribute.
TypeInfo GetTypeInfo() const
Return the TypeInfo object describing the object.
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.
static T Check(T result)
Internal usage. Checks if the last OCILIB function call has raised an error. If so, it raises a C++ exception using the retrieved error handle.
OCI_SYM_PUBLIC OCI_Coll *OCI_API OCI_ObjectGetColl(OCI_Object *obj, const otext *attr)
Return the collection value of the given object attribute.
ostring ToString() const override
return a string representation of the current object
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 boolean OCI_API OCI_ObjectSetObject(OCI_Object *obj, const otext *attr, OCI_Object *value)
Set an object attribute of type Object.
core::Enum< ObjectTypeValues > ObjectType
Object Type.
OCI_SYM_PUBLIC OCI_Date *OCI_API OCI_ObjectGetDate(OCI_Object *obj, const otext *attr)
Return the date value of the given object attribute.
Reference GetReference() const
Creates a reference on the current object.
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 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 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_ObjectSetInterval(OCI_Object *obj, const otext *attr, OCI_Interval *value)
Set an object attribute of type Interval.
Object identifying the SQL data type REF.
ostring MakeString(const otext *result, int size=-1)
Internal usage. Constructs a C++ string object from the given OCILIB string pointer.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectFree(OCI_Object *obj)
Free a local object.
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.
struct OCI_Ref OCI_Ref
Oracle REF type representation.
void * AnyPointer
Alias for the generic void pointer.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectAssign(OCI_Object *obj, OCI_Object *obj_src)
Assign an object to another one.
Template Enumeration template class providing some type safety to some extends for manipulating enume...
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetColl(OCI_Object *obj, const otext *attr, OCI_Coll *value)
Set an object attribute of type Collection.
Object identifying the SQL data type BFILE.
bool IsAttributeNull(const ostring &name) const
Check if an object attribute is null.
Object identifying the SQL data type INTERVAL.
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 boolean OCI_API OCI_ObjectIsNull(OCI_Object *obj, const otext *attr)
Check if an object attribute is null.
Internal usage. Provide a buffer class with RAII capabilities.
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_Object *OCI_API OCI_ObjectGetObject(OCI_Object *obj, const otext *attr)
Return the object value of the given object attribute.
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 boolean OCI_API OCI_ObjectSetString(OCI_Object *obj, const otext *attr, const otext *value)
Set an object attribute of type string.
OCI_SYM_PUBLIC OCI_Ref *OCI_API OCI_RefCreate(OCI_Connection *con, OCI_TypeInfo *typinf)
Create a local Ref instance.
Connection GetConnection() const
Return the connection associated with a statement.
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_Timestamp *OCI_API OCI_ObjectGetTimestamp(OCI_Object *obj, const otext *attr)
Return the timestamp 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 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_ObjectSetFile(OCI_Object *obj, const otext *attr, OCI_File *value)
Set an object attribute of type File.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetFloat(OCI_Object *obj, const otext *attr, float value)
Set an object attribute of type float.
std::vector< unsigned char > Raw
C++ counterpart of SQL RAW data type.
OCI_SYM_PUBLIC unsigned int OCI_API OCI_ObjectGetType(OCI_Object *obj)
Return the type of an object instance.
Provides type information on Oracle Database objects.
Object identifying the SQL data type NUMBER.
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 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_ObjectSetTimestamp(OCI_Object *obj, const otext *attr, OCI_Timestamp *value)
Set an object attribute of type Timestamp.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetNull(OCI_Object *obj, const otext *attr)
Set an object attribute to null.
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.
Lob< ostring, LobNationalCharacter > NClob
Class handling NCLOB oracle type.
void SetAttributeNull(const ostring &name)
Set the given object attribute to null.
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 boolean OCI_API OCI_ObjectSetLob(OCI_Object *obj, const otext *attr, OCI_Lob *value)
Set an object attribute of type Lob.
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
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 OCI_Number *OCI_API OCI_ObjectGetNumber(OCI_Object *obj, const otext *attr)
Return the number value of the given object attribute.
Lob< ostring, LobCharacter > Clob
Class handling CLOB oracle type.
OCI_SYM_PUBLIC OCI_Interval *OCI_API OCI_ObjectGetInterval(OCI_Object *obj, const otext *attr)
Return the interval value of the given object attribute.
void Set(const ostring &name, const T &value)
Set the given object attribute value.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetNumber(OCI_Object *obj, const otext *attr, OCI_Number *value)
Set an object attribute of type number.
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 ) ...
struct OCI_Object OCI_Object
Oracle Named types representation.
ObjectType GetType() const
Return the type of the given object.
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.
Object identifying the SQL data type TIMESTAMP.
Object identifying the SQL data type OBJECT.
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 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.
T Get(const ostring &name) const
Return the given object attribute value.
OCI_SYM_PUBLIC boolean OCI_API OCI_ObjectSetShort(OCI_Object *obj, const otext *attr, short value)
Set an object attribute of type short.
Object identifying the SQL data type DATE.