OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB) More...
#include <types.hpp>
Inherits ocilib::core::HandleHolder< OCI_Lob * >.
Public Member Functions | |
Lob () | |
Create an empty null Lob instance. | |
Lob (const Connection &connection) | |
Parametrized constructor. | |
T | Read (unsigned int length) |
Read a portion of a lob. | |
unsigned int | Write (const T &content) |
Write the given content at the current position within the lob. | |
unsigned int | Append (const T &content) |
Append the given content to the lob. | |
void | Append (const Lob &other) |
Append the given lob content to the lob. | |
bool | Seek (SeekMode seekMode, big_uint offset) |
Move the current position within the lob for read/write operations. | |
LobType | GetType () const |
return the type of lob | |
big_uint | GetOffset () const |
Returns the current R/W offset within the lob. | |
big_uint | GetLength () const |
Returns the number of characters or bytes contained in the lob. | |
big_uint | GetMaxSize () const |
Returns the lob maximum possible size. | |
big_uint | GetChunkSize () const |
Returns the current lob chunk size. | |
Connection | GetConnection () const |
Return the lob parent connection. | |
void | Truncate (big_uint length) |
Truncate the lob to a shorter length. | |
big_uint | Erase (big_uint offset, big_uint length) |
Erase a portion of the lob at a given position. | |
void | Copy (Lob &dest, big_uint offset, big_uint offsetDest, big_uint length) const |
Copy the given portion of the lob content to another one. | |
bool | IsTemporary () const |
Check if the given lob is a temporary lob. | |
bool | IsRemote () const |
Check if the given lob is a remote lob. | |
void | Open (OpenMode mode) |
Open explicitly a Lob. | |
void | Flush () |
Flush the lob content to the server (if applicable) | |
void | Close () |
Close explicitly a Lob. | |
void | EnableBuffering (bool value) |
Enable / disable buffering mode on the given lob object. | |
Lob | Clone () const |
Clone the current instance to a new one performing deep copy. | |
Lob & | operator+= (const Lob &other) |
Appending the given lob content to the current lob content. | |
bool | operator== (const Lob &other) const |
Indicates if the current lob value is equal to the given lob value. | |
bool | operator!= (const Lob &other) const |
Indicates if the current lob value is not equal the given lob value. | |
Object identifying the SQL data type LOB (CLOB, NCLOB and BLOB)
This class wraps the OCILIB object handle OCI_Lob and its related methods
|
inline |
ocilib::Lob< T, U >::Lob | ( | const Connection & | connection | ) |
Parametrized constructor.
connection | - Parent connection |
Definition at line 40 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobCreate().
T ocilib::Lob< T, U >::Read | ( | unsigned int | length | ) |
Read a portion of a lob.
length | - Maximum number of characters or bytes to read |
unsigned int ocilib::Lob< T, U >::Write | ( | const T & | content | ) |
Write the given content at the current position within the lob.
content | - content to write |
Definition at line 99 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobWrite2().
unsigned int ocilib::Lob< T, U >::Append | ( | const T & | content | ) |
Append the given content to the lob.
content | - content to write |
Definition at line 126 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobAppend().
void ocilib::Lob< T, U >::Append | ( | const Lob< T, U > & | other | ) |
Append the given lob content to the lob.
other | - source lob |
Definition at line 120 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobAppendLob().
bool ocilib::Lob< T, U >::Seek | ( | SeekMode | seekMode, |
big_uint | offset | ||
) |
Move the current position within the lob for read/write operations.
seekMode | - Seek mode |
offset | - offset from current position |
Definition at line 139 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobSeek().
LobType ocilib::Lob< T, U >::GetType |
return the type of lob
Definition at line 161 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobGetType().
big_uint ocilib::Lob< T, U >::GetOffset |
Returns the current R/W offset within the lob.
Definition at line 167 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobGetOffset().
big_uint ocilib::Lob< T, U >::GetLength |
Returns the number of characters or bytes contained in the lob.
Definition at line 173 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobGetLength().
big_uint ocilib::Lob< T, U >::GetMaxSize |
Returns the lob maximum possible size.
Definition at line 179 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobGetMaxSize().
big_uint ocilib::Lob< T, U >::GetChunkSize |
Returns the current lob chunk size.
Definition at line 185 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobGetChunkSize().
Connection ocilib::Lob< T, U >::GetConnection |
Return the lob parent connection.
Definition at line 191 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobGetConnection().
void ocilib::Lob< T, U >::Truncate | ( | big_uint | length | ) |
Truncate the lob to a shorter length.
length | - New length in characters or bytes |
Definition at line 201 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobTruncate().
big_uint ocilib::Lob< T, U >::Erase | ( | big_uint | offset, |
big_uint | length | ||
) |
Erase a portion of the lob at a given position.
offset | - Absolute position in source lob |
length | - Number of bytes or characters to erase |
Definition at line 207 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobErase().
void ocilib::Lob< T, U >::Copy | ( | Lob< T, U > & | dest, |
big_uint | offset, | ||
big_uint | offsetDest, | ||
big_uint | length | ||
) | const |
Copy the given portion of the lob content to another one.
dest | - Destination lob |
offset | - Absolute position in the lob |
offsetDest | - Absolute position in the destination lob |
length | - Number of characters or bytes to copy |
Definition at line 213 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobCopy().
bool ocilib::Lob< T, U >::IsTemporary |
Check if the given lob is a temporary lob.
Definition at line 219 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobIsTemporary().
bool ocilib::Lob< T, U >::IsRemote |
Check if the given lob is a remote lob.
Definition at line 225 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobIsRemote().
void ocilib::Lob< T, U >::Open | ( | OpenMode | mode | ) |
Open explicitly a Lob.
mode | - open mode |
Definition at line 231 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobOpen().
void ocilib::Lob< T, U >::Flush |
Flush the lob content to the server (if applicable)
Definition at line 237 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobFlush().
void ocilib::Lob< T, U >::Close |
Close explicitly a Lob.
Definition at line 243 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobClose().
void ocilib::Lob< T, U >::EnableBuffering | ( | bool | value | ) |
Enable / disable buffering mode on the given lob object.
value | - Enable/disable buffering mode |
Definition at line 249 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobEnableBuffering().
Lob< T, U > ocilib::Lob< T, U >::Clone |
Clone the current instance to a new one performing deep copy.
Definition at line 145 of file Lob.hpp.
References ocilib::core::Check(), and OCI_LobAssign().
Lob< T, U > & ocilib::Lob< T, U >::operator+= | ( | const Lob< T, U > & | other | ) |
bool ocilib::Lob< T, U >::operator== | ( | const Lob< T, U > & | other | ) | const |
bool ocilib::Lob< T, U >::operator!= | ( | const Lob< T, U > & | other | ) | const |