Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages   Examples  

OCICPP::TLob Class Reference

Representation of an Oracle temporary large object. More...

List of all members.

Public Methods

 TLob ()
 TLob (OCIEnv *env, OCISvcCtx *svcctx, OCIError *err, int lob_type, int cache_mode)
void init (OCIEnv *envhp, OCISvcCtx *svcctx, OCIError *err, int lob_type, int cache_mode)
 ~TLob ()
void drop ()
void seek (unsigned offset, int dir)
unsigned tell ()
unsigned read (void *buff, int blen)
unsigned write (const void *buff, int blen)
void trunc (unsigned)
void loadFromBFile (BFile &bfile, unsigned int amount, unsigned int dst_offset, unsigned int src_offset)
void setCacheMode (int mode)
unsigned getLen () const
void copyFrom (Lob &src_lob, unsigned amount, unsigned dst_off, unsigned src_off)
void copyFrom (TLob &src_lob, unsigned amount, unsigned dst_off, unsigned src_off)
void copyFrom (BFile &src_file, unsigned amount, unsigned dst_off, unsigned src_off)

Friends

class  Lob


Detailed Description

Representation of an Oracle temporary large object.

Temporary LOBs within Oracle are almost like normal (persistent) LOBs, with the exception that they only exist during the current session. In constrast to LOBs, TLOBs are not stored within 'normal' tablespace(s), but exist only within the temporary tablespace(s).

This class is only available for Oracle 8i and above


Constructor & Destructor Documentation

OCICPP::TLob::TLob ( )
 

Default-Constructor for a temporary LOB. A TLOB may be initialized by calling void Connection::createTLob()

This functions is only available for Oracle 8i and above

OCICPP::TLob::~TLob ( )
 

At the end of a duration (e.g. the current session or an explicitly specified duration), all temporary LOBs associated to this duration are freed.

However, the descriptor associated with the temporary LOB must be freed explicitly.

This functions is only available for Oracle 8i and above


Member Function Documentation

void OCICPP::TLob::copyFrom ( BFile & src_file,
unsigned amount,
unsigned dst_off,
unsigned src_off )
 

Copies data from a BFile src_file

See also:
copyFrom(Lob &,unsigned,unsigned,unsigned)
This functions is only available for Oracle 8i and above

void OCICPP::TLob::copyFrom ( TLob & src_lob,
unsigned amount,
unsigned dst_off,
unsigned src_off )
 

Copies data from a temporary Lob src_lob

See also:
copyFrom(Lob &,unsigned,unsigned,unsigned)
This functions is only available for Oracle 8i and above

void OCICPP::TLob::copyFrom ( Lob & src_lob,
unsigned amount,
unsigned dst_off,
unsigned src_off )
 

Copies data from Lob src_lob

Both locators must be of the same type (they are both must be BLOB or CLOB)

Lob cache must not be enabled for either locator.

The amount parameter indicates the maximum amount to copy.

If the end of the source LOB is reached before the specified amount is copied, the operation terminates without error.

See also:
setCacheMode(), getLen(), loadFromBFile()
This functions is only available for Oracle 8i and above

void OCICPP::TLob::drop ( )
 

Drop (free) a temporary LOB.

This functions is only available for Oracle 8i and above

unsigned OCICPP::TLob::getLen ( ) const
 

Retreive the total amount of data stored within this temporary lob.

This functions is only available for Oracle 8i and above

unsigned OCICPP::TLob::read ( void * buf,
int buf_len )
 

Read a sequence of buf_len bytes from the temporary lob into the buffer buf. The amount of bytes actually transfered is being returned.

This functions is only available for Oracle 8i and above

void OCICPP::TLob::seek ( unsigned new_offset,
int dir )
 

Seek a position within the temporary LOB.

Parameters:
dir   may be SET, CUR or END .
  • SET new_offset from begining of the temporary lob. new_offset may not be greater than temporary Lob's length ( getLen() ).
  • CUR modifies the access point within the temporary lob relative to the current position. current position + new_offset may not exceed the temporary lob's length
  • END sets the position from the end of the temporary lob.
new_offset   is the new distance relative to the given direction dir
This functions is only available for Oracle 8i and above

void OCICPP::TLob::setCacheMode ( int mode )
 

Todo:
not implemented
This functions is only available for Oracle 8i and above

unsigned OCICPP::TLob::tell ( )
 

Retuns the current position from the start of the temporary lob. For this position, the inequation 0 <= tell() < getLen() holds.

This functions is only available for Oracle 8i and above

void OCICPP::TLob::trunc ( unsigned new_len )
 

Truncates the temporary lob to a specified to a length of new_len bytes. The function throws an exception if new_len is greater than the current temporary LOB's length.

This functions is only available for Oracle 8i and above

unsigned OCICPP::TLob::write ( const void * buf,
int buf_len )
 

Write a sequence of buf_len bytes into the temporary lob from the buffer buf. The amount of bytes actually transfered is being returned.

This functions is only available for Oracle 8i and above


The documentation for this class was generated from the following files:
Generated at Tue Jun 12 10:37:32 2001 for OCI C++ Library by doxygen1.2.4-20010128 written by Dimitri van Heesch, © 1997-2001