SequoiaDB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Public Attributes | List of all members
sdbclient::sdbLob Class Reference

Database operation interfaces of large object. More...

#include <client.hpp>

Public Member Functions

 sdbLob ()
 Default constructor.
 
 ~sdbLob ()
 Destructor.
 
INT32 close ()
 Close lob.
 
INT32 read (UINT32 len, CHAR *buf, UINT32 *read)
 Read lob.
 
INT32 write (const CHAR *buf, UINT32 len)
 Write lob.
 
INT32 seek (SINT64 size, SDB_LOB_SEEK whence)
 Seek the place to read.
 
INT32 lock (INT64 offset, INT64 length)
 lock LOB section for write mode.
 
INT32 lockAndSeek (INT64 offset, INT64 length)
 lock LOB section for write mode and seek to the offset position.
 
INT32 isClosed (BOOLEAN &flag)
 Test whether lob has been closed or not.
 
BOOLEAN isClosed ()
 Test whether lob has been closed or not.
 
INT32 getOid (bson::OID &oid)
 Get the lob's oid.
 
bson::OID getOid ()
 Get the lob's oid.
 
INT32 getSize (SINT64 *size)
 Get the lob's size.
 
SINT64 getSize ()
 Get the lob's size. The size of lob, or -1 when the lob is not be opened or has been closed.
 
INT32 getCreateTime (UINT64 *millis)
 Get lob's create time.
 
UINT64 getCreateTime ()
 Get lob's create time.
 
UINT64 getModificationTime ()
 Get lob's last modification time.
 
INT32 getPiecesInfoNum ()
 Get the count of lob's pieces.
 
bson::BSONArray getPiecesInfo ()
 Get lob's pieces.
 
BOOLEAN isEof ()
 Check whether current offset has reached to the max size of current lob.
 
INT32 getRunTimeDetail (bson::BSONObj &detail)
 Get the run time detail information of lob.
 

Public Attributes

_sdbLob * pLob
 

Detailed Description

Database operation interfaces of large object.

Member Function Documentation

INT32 sdbclient::sdbLob::close ( )
inline

Close lob.

Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbLob::getCreateTime ( UINT64 *  millis)
inline

Get lob's create time.

Parameters
[out]millisThe create time in milliseconds of lob
Return values
SDB_OKOperation Success
OthersOperation Fail
Deprecated:
Deprecated in version 2.x. Use "UINT64 getCreateTime ()" instead
UINT64 sdbclient::sdbLob::getCreateTime ( )
inline

Get lob's create time.

Return values
Thecreate time in milliseconds of lob or -1 when the lob does not be opened or has been closed
UINT64 sdbclient::sdbLob::getModificationTime ( )
inline

Get lob's last modification time.

Return values
Themodification time in milliseconds of lob or -1 when the lob does not be opened or has been closed
INT32 sdbclient::sdbLob::getOid ( bson::OID &  oid)
inline

Get the lob's oid.

Parameters
[out]oidThe oid of the lob
Return values
SDB_OKOperation Success
OthersOperation Fail
Deprecated:
Deprecated in version 2.x. Use "bson::OID getOid ()" instead
bson::OID sdbclient::sdbLob::getOid ( )
inline

Get the lob's oid.

Return values
Theoid of the lob or a empty Oid bson::OID() when the lob is not be opened or has been closed
bson::BSONArray sdbclient::sdbLob::getPiecesInfo ( )
inline

Get lob's pieces.

Return values
Thearray of lob's pieces.
INT32 sdbclient::sdbLob::getPiecesInfoNum ( )
inline

Get the count of lob's pieces.

Return values
thecount of lob's pieces
INT32 sdbclient::sdbLob::getRunTimeDetail ( bson::BSONObj &  detail)
inline

Get the run time detail information of lob.

Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbLob::getSize ( SINT64 *  size)
inline

Get the lob's size.

Parameters
[out]sizeThe size of lob
Return values
SDB_OKOperation Success
OthersOperation Fail
Deprecated:
Deprecated in version 2.x. Use "SINT64 getSize ()" instead
INT32 sdbclient::sdbLob::isClosed ( BOOLEAN &  flag)
inline

Test whether lob has been closed or not.

Parameters
[out]flagTRUE for lob has been closed, FALSE for not.
Return values
SDB_OKOperation Success
OthersOperation Fail
Deprecated:
Deprecated in version 2.x. Use "BOOLEAN isClosed()" instead
BOOLEAN sdbclient::sdbLob::isClosed ( )
inline

Test whether lob has been closed or not.

Return values
TRUEfor lob has been closed, FALSE for not.
BOOLEAN sdbclient::sdbLob::isEof ( )
inline

Check whether current offset has reached to the max size of current lob.

Return values
Returntrue if yes while false for not.
INT32 sdbclient::sdbLob::lock ( INT64  offset,
INT64  length 
)
inline

lock LOB section for write mode.

Parameters
[in]offsetThe lock start position
[in]lengthThe lock length, -1 means lock to the end of lob
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbLob::lockAndSeek ( INT64  offset,
INT64  length 
)
inline

lock LOB section for write mode and seek to the offset position.

Parameters
[in]offsetThe lock start position
[in]lengthThe lock length, -1 means lock to the end of lob
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbLob::read ( UINT32  len,
CHAR *  buf,
UINT32 *  read 
)
inline

Read lob.

Parameters
[in]lenThe length want to read
[out]bufPut the data into buf
[out]readThe length of read
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbLob::seek ( SINT64  size,
SDB_LOB_SEEK  whence 
)
inline

Seek the place to read.

Parameters
[in]sizeThe size of seek
[in]whenceThe whence of seek
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbLob::write ( const CHAR *  buf,
UINT32  len 
)
inline

Write lob.

Parameters
[in]bufThe buf of write
[in]lenThe length of write
Return values
SDB_OKOperation Success
OthersOperation Fail

Member Data Documentation

sdbclient::sdbLob::pLob

A pointer of virtual base class _sdbLob

Class sdbLob is a shell for _sdbLob. We use pLob to call the methods in class _sdbLob.


The documentation for this class was generated from the following file: