OCILIB (C and C++ Driver for Oracle)  4.6.3
ocilib::Reference Class Reference

Object identifying the SQL data type REF. More...

#include <ocilib.hpp>

Inherits ocilib::HandleHolder< OCI_Ref *>, and ocilib::Streamable.

Public Member Functions

 Reference ()
 Create an empty null Reference instance.
 
 Reference (const TypeInfo &typeInfo)
 Parametrized constructor. More...
 
TypeInfo GetTypeInfo () const
 Return the TypeInfo object describing the referenced object.
 
Object GetObject () const
 Returns the object pointed by the reference. More...
 
bool IsReferenceNull () const
 Check if the reference points to an object or not.
 
void SetReferenceNull ()
 Nullify the given Ref handle. More...
 
Reference Clone () const
 Clone the current instance to a new one performing deep copy.
 
ostring ToString () const override
 return a string representation of the current reference
 

Detailed Description

Object identifying the SQL data type REF.

This class wraps the OCILIB object handle OCI_Ref and its related methods

Definition at line 5001 of file ocilib.hpp.

Constructor & Destructor Documentation

◆ Reference()

ocilib::Reference::Reference ( const TypeInfo typeInfo)
inline

Parametrized constructor.

Parameters
typeInfo- type info descriptor

Definition at line 3828 of file ocilib_impl.hpp.

References ocilib::Check(), ocilib::TypeInfo::GetConnection(), OCI_RefCreate(), OCI_RefFree(), and Reference().

Member Function Documentation

◆ GetObject()

Object ocilib::Reference::GetObject ( ) const
inline

Returns the object pointed by the reference.

Returns
The object may bu null is the current reference value is null

Definition at line 3844 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_RefGetObject().

◆ SetReferenceNull()

void ocilib::Reference::SetReferenceNull ( )
inline

Nullify the given Ref handle.

Note
this call clears the reference to object pointed by the reference object.

Definition at line 3863 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_RefSetNull().