Main Page   Class Hierarchy   Compound List   File List   Compound Members  

dbBlob Class Reference

#include <blob.h>

Inheritance diagram for dbBlob:

dbAnyReference List of all members.

Public Methods

void create (dbDatabase &dbase, size_t size=dbDefaultFirstBlobSegmentSize)
size_t getSize (dbDatabase &db)
dbBlobReadIterator getReadIterator (dbDatabase &db)
dbBlobWriteIterator getWriteIterator (dbDatabase &db, size_t maxExtent=dbDefaultBlobExtent)
dbBlob & operator= (dbAnyReference const &ref)
void free (dbDatabase &db)
oid_t getOid () const
bool isNull () const

Friends

bool isNull (dbAnyReference const &ref)

Detailed Description

BLOB class. BLOB in GigaBASE is separate objects accessed by reference. So when record contains BLOB object, it contains reference to the object. As a result, the same BLOB can be referenced by multiple records, but if record is deleted, BLOB is not deleted. You should explicitely invoke dbBlob::free method


Member Function Documentation

void dbBlob::create dbDatabase   dbase,
size_t    size = dbDefaultFirstBlobSegmentSize
 

Create BLOB object

Parameters:
dbase  reference to the database
size  size of the first BLOB segments. Other segments will be created on demand and size of new segment will be taken as doubled size of the last segment.

void dbBlob::free dbDatabase   db
 

Free BLOB object. Programmer should explicitely invoke this method to deallcoate BLOB object. BLOB object will not be deallocated when record containing reference to it is deleted.

Parameters:
db  reference to the database

oid_t dbAnyReference::getOid   const [inline, inherited]
 

Get object idetifier

Returns:
object identifier of referenced object

dbBlobReadIterator dbBlob::getReadIterator dbDatabase   db
 

Get read iterator to access BLOB

Parameters:
db  reference to the database
Returns:
read iterator

size_t dbBlob::getSize dbDatabase   db
 

Get size of the BLOB

Parameters:
db  reference to the database
Returns:
number of byte sin all BLOB segments

dbBlobWriteIterator dbBlob::getWriteIterator dbDatabase   db,
size_t    maxExtent = dbDefaultBlobExtent
 

Get write iterator to access BLOB

Parameters:
db  reference to the database
maxExtent  size of new segment when BLOB is extended. When BLOB has to be extended, size of last segment is doubled. If it is greater than maxExtent, then maxExtent will be used as size of new segment, otherwise doubled size of last segment will be used as size of new segment.
Returns:
write iterator

bool dbAnyReference::isNull   const [inline, inherited]
 

Check whether reference is null

dbBlob& dbBlob::operator= dbAnyReference const &    ref [inline]
 

Assignment operator for BLOB. This operator change reference to the BLOB but has no influence on BLOB object itself.

Parameters:
ref  assigned BLOB reference
Returns:
assigned reference

Reimplemented from dbAnyReference.


Friends And Related Function Documentation

bool isNull dbAnyReference const &    ref [friend, inherited]
 

Check whether reference is null


The documentation for this class was generated from the following file:
Generated on Thu Aug 23 19:35:52 2007 for GigaBASE by doxygen1.2.18