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

Database operation interfaces of sequence. More...

#include <client.hpp>

Public Member Functions

 sdbSequence ()
 Default constructor.
 
 ~sdbSequence ()
 Destructor.
 
INT32 setAttributes (const bson::BSONObj &options)
 Alter sequence.
 
INT32 getNextValue (INT64 &value)
 Get the next value of sequence.
 
INT32 getCurrentValue (INT64 &value)
 Get the current value of sequence.
 
INT32 setCurrentValue (const INT64 value)
 Set the current value to sequence.
 
INT32 fetch (const INT32 fetchNum, INT64 &nextValue, INT32 &returnNum, INT32 &increment)
 Fetch a bulk of continuous values.
 
INT32 restart (const INT64 startValue)
 Restart sequence from the given value.
 

Public Attributes

_sdbSequence * pSequence
 

Detailed Description

Database operation interfaces of sequence.

Member Function Documentation

INT32 sdbclient::sdbSequence::fetch ( const INT32  fetchNum,
INT64 &  nextValue,
INT32 &  returnNum,
INT32 &  Increment 
)
inline

Fetch a bulk of continuous values.

Parameters
[in]fetchNumThe number of values to be fetched.
[out]nextValueThe next value and also the first returned value.
[out]returnNumThe number of values returned.
[out]incrementIncrement of values.
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbSequence::getCurrentValue ( INT64 &  value)
inline

Get the current value of sequence.

Parameters
[out]valueThe current value
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbSequence::getNextValue ( INT64 &  value)
inline

Get the next value of sequence.

Parameters
[out]valueThe next value
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbSequence::restart ( const INT64  startValue)
inline

Restart sequence from the given value.

Parameters
[in]startValueThe start value.
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbSequence::setAttributes ( const bson::BSONObj &  options)
inline

Alter sequence.

Parameters
[in]optionsThe options of sequence to be changed, e.g. { "CurrentValue": 4096 }.
CurrentValue   : The current value of sequence
StartValue     : The start value of sequence
MinValue       : The minimum value of sequence
MaxValue       : The maxmun value of sequence
Increment      : The increment value of sequence
CacheSize      : The cache size of sequence
AcquireSize    : The acquire size of sequence
Cycled         : The cycled flag of sequence
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbSequence::setCurrentValue ( const INT64  value)
inline

Set the current value to sequence.

Parameters
[in]valueThe expected current value
Return values
SDB_OKOperation Success
OthersOperation Fail

Member Data Documentation

sdbclient::sdbSequence::pSequence

A pointer of virtual base class _sdbSequence

Class sdbSequence is a shell for _sdbSequence. We use pSequence to call the methods in class _sdbSequence.


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