Database operation interfaces of cursor.
More...
#include <client.hpp>
|
| sdbCursor () |
| default constructor
|
|
| ~sdbCursor () |
| destructor
|
|
INT32 | next (bson::BSONObj &obj, BOOLEAN getOwned=TRUE) |
| Return the next document of current cursor, and move forward.
|
|
INT32 | current (bson::BSONObj &obj, BOOLEAN getOwned=TRUE) |
| Return the current document of cursor, and don't move.
|
|
INT32 | close () |
| Close the cursor's connection to database.
|
|
Database operation interfaces of cursor.
INT32 sdbclient::sdbCursor::close |
( |
| ) |
|
|
inline |
Close the cursor's connection to database.
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbCursor::current |
( |
bson::BSONObj & |
obj, |
|
|
BOOLEAN |
getOwned = TRUE |
|
) |
| |
|
inline |
Return the current document of cursor, and don't move.
- Parameters
-
[in] | getOwned | Whether the return bson object should have its own buffer, default to be TRUE.
-
TRUE : In this case the return bson object is a new full (and owned) copy of the current document and it keep the contents in it's own buffer, that mean you can use the return bson object whenever you want.
-
FALSE : In this case the return bson object does not keep contents in it's own buffer, and you should use the return bson object before the receive buffer of the connection is overwrite by another operation.
|
[out] | obj | The return bson object |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbCursor::next |
( |
bson::BSONObj & |
obj, |
|
|
BOOLEAN |
getOwned = TRUE |
|
) |
| |
|
inline |
Return the next document of current cursor, and move forward.
- Parameters
-
[in] | getOwned | Whether the return bson object should have its own buffer, default to be TRUE.
-
TRUE : In this case the return bson object is a new full (and owned) copy of the next document and it keep the contents in it's own buffer, that mean you can use the return bson object whenever you want.
-
FALSE : In this case the return bson object does not keep contents in it's own buffer, and you should use the return bson object before the receive buffer of the connection is overwrite by another operation.
|
[out] | obj | The return bson object |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
sdbclient::sdbCursor::pCursor |
A pointer of virtual base class _sdbCursor
Class sdbCursor is a shell for _sdbCursor. We use pCursor to call the methods in class _sdbCursor.
The documentation for this class was generated from the following file: