DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Properties | Private Member Functions | Private Attributes | List of all members
Deveel.Data.Sql.Sequences.SequenceManager.Sequence Class Reference
Inheritance diagram for Deveel.Data.Sql.Sequences.SequenceManager.Sequence:
Deveel.Data.Sql.Sequences.ISequence Deveel.Data.Sql.IDbObject

Public Member Functions

 Sequence (SequenceManager manager, SqlNumber id, SequenceInfo sequenceInfo)
 
 Sequence (SequenceManager manager, SqlNumber id, SqlNumber lastValue, SequenceInfo sequenceInfo)
 
SqlNumber GetCurrentValue ()
 
SqlNumber NextValue ()
 
SqlNumber SetValue (SqlNumber value)
 
void IncrementCurrentValue ()
 
void IncrementLastValue ()
 

Properties

SqlNumber Id [get, private set]
 
ObjectName FullName [get, private set]
 
DbObjectType IDbObject. ObjectType [get]
 
SequenceInfo SequenceInfo [get, private set]
 
SqlNumber LastValue [get, set]
 
SqlNumber CurrentValue [get, set]
 
- Properties inherited from Deveel.Data.Sql.Sequences.ISequence
SequenceInfo SequenceInfo [get]
 Gets the configuration information of the sequence. More...
 
- Properties inherited from Deveel.Data.Sql.IDbObject
ObjectName FullName [get]
 Gets the fully qualified name of the object used to resolve it uniquely within the database. More...
 
DbObjectType ObjectType [get]
 Gets the type of database object that the implementation is for More...
 

Private Member Functions

SqlNumber IncrementValue (SqlNumber val)
 

Private Attributes

readonly SequenceManager manager
 

Detailed Description

Definition at line 692 of file SequenceManager.cs.

Constructor & Destructor Documentation

Deveel.Data.Sql.Sequences.SequenceManager.Sequence.Sequence ( SequenceManager  manager,
SqlNumber  id,
SequenceInfo  sequenceInfo 
)
inline

Definition at line 695 of file SequenceManager.cs.

696  : this(manager, id, SqlNumber.Null, sequenceInfo) {
697  }
static readonly SqlNumber Null
Definition: SqlNumber.cs:31
Deveel.Data.Sql.Sequences.SequenceManager.Sequence.Sequence ( SequenceManager  manager,
SqlNumber  id,
SqlNumber  lastValue,
SequenceInfo  sequenceInfo 
)
inline

Definition at line 699 of file SequenceManager.cs.

Member Function Documentation

SqlNumber Deveel.Data.Sql.Sequences.SequenceManager.Sequence.GetCurrentValue ( )
inline
void Deveel.Data.Sql.Sequences.SequenceManager.Sequence.IncrementCurrentValue ( )
inline
void Deveel.Data.Sql.Sequences.SequenceManager.Sequence.IncrementLastValue ( )
inline
SqlNumber Deveel.Data.Sql.Sequences.SequenceManager.Sequence.IncrementValue ( SqlNumber  val)
inlineprivate

Definition at line 734 of file SequenceManager.cs.

734  {
735  val += SequenceInfo.Increment;
736  if (val > SequenceInfo.MaxValue) {
737  if (SequenceInfo.Cycle) {
738  val = SequenceInfo.MinValue;
739  } else {
740  throw new InvalidOperationException("Sequence out of bounds.");
741  }
742  }
743  if (val < SequenceInfo.MinValue) {
744  if (SequenceInfo.Cycle) {
745  val = SequenceInfo.MaxValue;
746  } else {
747  throw new InvalidOperationException("Sequence out of bounds.");
748  }
749  }
750  return val;
751  }
SqlNumber Increment
Gets the configured incremental value, that is the value added to the current value of a sequence eac...
SqlNumber MaxValue
Gets the configured maximum value of the sequence.
SqlNumber MinValue
Gets the configured minimum value of the sequence.
bool Cycle
Gets true if the sequence will cycle when it reaches either MinValue or MaxValue. ...
SqlNumber Deveel.Data.Sql.Sequences.SequenceManager.Sequence.NextValue ( )
inline
SqlNumber Deveel.Data.Sql.Sequences.SequenceManager.Sequence.SetValue ( SqlNumber  value)
inline

Implements Deveel.Data.Sql.Sequences.ISequence.

Definition at line 730 of file SequenceManager.cs.

730  {
731  return manager.SetValue(FullName, value);
732  }
SqlNumber SetValue(ObjectName name, SqlNumber value)

Member Data Documentation

readonly SequenceManager Deveel.Data.Sql.Sequences.SequenceManager.Sequence.manager
private

Definition at line 693 of file SequenceManager.cs.

Property Documentation

SqlNumber Deveel.Data.Sql.Sequences.SequenceManager.Sequence.CurrentValue
getset

Definition at line 720 of file SequenceManager.cs.

ObjectName Deveel.Data.Sql.Sequences.SequenceManager.Sequence.FullName
getprivate set

Definition at line 710 of file SequenceManager.cs.

SqlNumber Deveel.Data.Sql.Sequences.SequenceManager.Sequence.Id
getprivate set

Definition at line 708 of file SequenceManager.cs.

SqlNumber Deveel.Data.Sql.Sequences.SequenceManager.Sequence.LastValue
getset

Definition at line 718 of file SequenceManager.cs.

DbObjectType IDbObject. Deveel.Data.Sql.Sequences.SequenceManager.Sequence.ObjectType
getprivate

Definition at line 712 of file SequenceManager.cs.

SequenceInfo Deveel.Data.Sql.Sequences.SequenceManager.Sequence.SequenceInfo
getprivate set

Definition at line 716 of file SequenceManager.cs.


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