Database operation interfaces of sequence.
More...
#include <client.hpp>
|
| 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.
|
|
Database operation interfaces of sequence.
INT32 sdbclient::sdbSequence::fetch |
( |
const INT32 |
fetchNum, |
|
|
INT64 & |
nextValue, |
|
|
INT32 & |
returnNum, |
|
|
INT32 & |
Increment |
|
) |
| |
|
inline |
Fetch a bulk of continuous values.
- Parameters
-
[in] | fetchNum | The number of values to be fetched. |
[out] | nextValue | The next value and also the first returned value. |
[out] | returnNum | The number of values returned. |
[out] | increment | Increment of values. |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbSequence::getCurrentValue |
( |
INT64 & |
value | ) |
|
|
inline |
Get the current value of sequence.
- Parameters
-
[out] | value | The current value |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbSequence::getNextValue |
( |
INT64 & |
value | ) |
|
|
inline |
Get the next value of sequence.
- Parameters
-
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbSequence::restart |
( |
const INT64 |
startValue | ) |
|
|
inline |
Restart sequence from the given value.
- Parameters
-
[in] | startValue | The start value. |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbSequence::setAttributes |
( |
const bson::BSONObj & |
options | ) |
|
|
inline |
Alter sequence.
- Parameters
-
[in] | options | The 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_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbSequence::setCurrentValue |
( |
const INT64 |
value | ) |
|
|
inline |
Set the current value to sequence.
- Parameters
-
[in] | value | The expected current value |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
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: