Database operation interfaces of large object.
More...
#include <client.hpp>
|
| 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.
|
|
Database operation interfaces of large object.
INT32 sdbclient::sdbLob::close |
( |
| ) |
|
|
inline |
Close lob.
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbLob::getCreateTime |
( |
UINT64 * |
millis | ) |
|
|
inline |
Get lob's create time.
- Parameters
-
[out] | millis | The create time in milliseconds of lob |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
- Deprecated:
- Deprecated in version 2.x. Use "UINT64 getCreateTime ()" instead
UINT64 sdbclient::sdbLob::getCreateTime |
( |
| ) |
|
|
inline |
Get lob's create time.
- Return values
-
The | create 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
-
The | modification 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] | oid | The oid of the lob |
- Return values
-
SDB_OK | Operation Success |
Others | Operation 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
-
The | oid 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
-
The | array of lob's pieces. |
INT32 sdbclient::sdbLob::getPiecesInfoNum |
( |
| ) |
|
|
inline |
Get the count of lob's pieces.
- Return values
-
INT32 sdbclient::sdbLob::getSize |
( |
SINT64 * |
size | ) |
|
|
inline |
Get the lob's size.
- Parameters
-
- Return values
-
SDB_OK | Operation Success |
Others | Operation 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] | flag | TRUE for lob has been closed, FALSE for not. |
- Return values
-
SDB_OK | Operation Success |
Others | Operation 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
-
TRUE | for 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
-
Return | true if yes while false for not. |
INT32 sdbclient::sdbLob::lock |
( |
INT64 |
offset, |
|
|
INT64 |
length |
|
) |
| |
|
inline |
lock LOB section for write mode.
- Parameters
-
[in] | offset | The lock start position |
[in] | length | The lock length, -1 means lock to the end of lob |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbLob::lockAndSeek |
( |
INT64 |
offset, |
|
|
INT64 |
length |
|
) |
| |
|
inline |
lock LOB section for write mode and seek to the offset position.
- Parameters
-
[in] | offset | The lock start position |
[in] | length | The lock length, -1 means lock to the end of lob |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbLob::read |
( |
UINT32 |
len, |
|
|
CHAR * |
buf, |
|
|
UINT32 * |
read |
|
) |
| |
|
inline |
Read lob.
- Parameters
-
[in] | len | The length want to read |
[out] | buf | Put the data into buf |
[out] | read | The length of read |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbLob::seek |
( |
SINT64 |
size, |
|
|
SDB_LOB_SEEK |
whence |
|
) |
| |
|
inline |
Seek the place to read.
- Parameters
-
[in] | size | The size of seek |
[in] | whence | The whence of seek |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbLob::write |
( |
const CHAR * |
buf, |
|
|
UINT32 |
len |
|
) |
| |
|
inline |
Write lob.
- Parameters
-
[in] | buf | The buf of write |
[in] | len | The length of write |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
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: