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

Database operation interfaces of cursor. More...

#include <client.hpp>

Public Member Functions

 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.
 

Public Attributes

_sdbCursor * pCursor
 

Detailed Description

Database operation interfaces of cursor.

Member Function Documentation

INT32 sdbclient::sdbCursor::close ( )
inline

Close the cursor's connection to database.

Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbCursor::current ( bson::BSONObj &  obj,
BOOLEAN  getOwned = TRUE 
)
inline

Return the current document of cursor, and don't move.

Parameters
[in]getOwnedWhether 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]objThe return bson object
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbCursor::next ( bson::BSONObj &  obj,
BOOLEAN  getOwned = TRUE 
)
inline

Return the next document of current cursor, and move forward.

Parameters
[in]getOwnedWhether 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]objThe return bson object
Return values
SDB_OKOperation Success
OthersOperation Fail

Member Data Documentation

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: