SequoiaDB
 All Classes Namespaces Files Functions Variables Enumerations Properties Pages
Public Member Functions | Properties | List of all members
SequoiaDB.DBSequence Class Reference

Database operation interfaces of sequence. More...

Public Member Functions

BsonDocument Fetch (int fetchNum)
 Fetch a bulk of continuous values.
 
long GetCurrentValue ()
 Get the current value of sequence.
 
long GetNextValue ()
 Get the next value of sequence.
 
void Restart (long startValue)
 Restart sequence from the given value.
 
void SetAttributes (BsonDocument options)
 Alter sequence.
 
void SetCurrentValue (long value)
 Set the current value to sequence.
 

Properties

string Name [get]
 Return the name of current sequence.
 

Detailed Description

Database operation interfaces of sequence.

Member Function Documentation

BsonDocument SequoiaDB.DBSequence.Fetch ( int  fetchNum)
inline

Fetch a bulk of continuous values.

Parameters
fetchNumThe number of values to be fetched
Returns
A BsonDocument that contains the following fields:
  • NextValue(long) : The next value and also the first returned value.
  • ReturnNum(int) : The number of values returned.
  • Increment(int) : Increment of values.
Exceptions
SequoiaDB.BaseException
System.Exception
long SequoiaDB.DBSequence.GetCurrentValue ( )
inline

Get the current value of sequence.

Returns
The current value
Exceptions
SequoiaDB.BaseException
System.Exception
long SequoiaDB.DBSequence.GetNextValue ( )
inline

Get the next value of sequence.

Returns
The next value
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.DBSequence.Restart ( long  startValue)
inline

Restart sequence from the given value.

Parameters
startValueThe start value.
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.DBSequence.SetAttributes ( BsonDocument  options)
inline

Alter sequence.

Parameters
optionsThe options specified by user, details as bellow:
  • CurrentValue(long) : The current value of sequence
  • StartValue(long) : The start value of sequence
  • MinValue(long) : The minimum value of sequence
  • MaxValue(long) : The maxmun value of sequence
  • Increment(int) : The increment value of sequence
  • CacheSize(int) : The cache size of sequence
  • AcquireSize(int) : The acquire size of sequence
  • Cycled(boolean) : The cycled flag of sequence
Exceptions
SequoiaDB.BaseException
System.Exception
void SequoiaDB.DBSequence.SetCurrentValue ( long  value)
inline

Set the current value to sequence.

Parameters
valueThe expected current value
Exceptions
SequoiaDB.BaseException
System.Exception

Property Documentation

SequoiaDB.DBSequence.Name
get

Return the name of current sequence.

Returns
The sequence name

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