SequoiaDB
 All Classes Functions
Public Member Functions | List of all members
pysequoiadb.sequence.sequence Class Reference
Inheritance diagram for pysequoiadb.sequence.sequence:

Public Member Functions

def __init__
 
def __del__
 
def fetch
 
def get_current_value
 
def get_next_value
 
def restart
 
def set_attributes
 
def set_current_value
 

Detailed Description

Sequence for SequoiaDB

Constructor & Destructor Documentation

def pysequoiadb.sequence.sequence.__init__ (   self)
create a new sequence.
def pysequoiadb.sequence.sequence.__del__ (   self)
delete a sequence.

Member Function Documentation

def pysequoiadb.sequence.sequence.fetch (   self,
  fetch_num 
)
Fetch a bulk of continuous values.

Parameters:
   Name          Type    Info
   fetch_num     int     The number of values to be fetched.
Return values:
   A dict object that contains the following fields:
   - next_value  int     The next value and also the first returned value.
   - return_num  int     The number of values returned.
   - increment   int     Increment of values.
Exceptions:
   pysequoiadb.error.SDBBaseError
def pysequoiadb.sequence.sequence.get_current_value (   self)
Get the current value of sequence.

Return values:
   The current value
Exceptions:
   pysequoiadb.error.SDBBaseError
def pysequoiadb.sequence.sequence.get_next_value (   self)
Get the next value of sequence.

Return values:
   The next value
Exceptions:
   pysequoiadb.error.SDBBaseError
def pysequoiadb.sequence.sequence.restart (   self,
  start_value 
)
Restart sequence from the given value.

Parameters:
   Name          Type    Info
   start_value   int     The start value
Exceptions:
   pysequoiadb.error.SDBBaseError
def pysequoiadb.sequence.sequence.set_attributes (   self,
  options 
)
Alter sequence.

Parameters:
   Name              Type    Info
   options           dict    The options of sequence to be changed:
   - CurrentValue    int     The current value of sequence
   - StartValue      int     The start value of sequence
   - MinValue        int     The minimum value of sequence
   - MaxValue        int     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          bool    The cycled flag of sequence
Exceptions:
   pysequoiadb.error.SDBBaseError
def pysequoiadb.sequence.sequence.set_current_value (   self,
  value 
)
Set the current value to sequence.

Parameters:
   Name    Type    Info
   value   int     The expected current value
Exceptions:
   pysequoiadb.error.SDBBaseError

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