Class CachedSequence
This class is used to get sequence numbers (primary keys) for tables, where the physical sequence table is updated in batches.
Inheritance
System.Object
CachedSequence
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: SuperOffice.Data
Assembly: SoDataBase.dll
Syntax
[SoInject("Database")]
public class CachedSequence
Remarks
Picking from sequence one-by-one is the default and usually correct approach, since it (almost) guarantees a chronological order in the target table, and no holes. However, there are cases where, for performance reasons, it is better to "burn" an interval. This is kept in-memory and then given out. If the process recycles or another process does the same, holes may result; and the target table id's may not be in chronological order.
Methods
GetNext(String, Int32)
Declaration
public int GetNext(string tableName, int physicalBatchSize = 100)
Parameters
Type | Name | Description |
---|---|---|
System.String | tableName | |
System.Int32 | physicalBatchSize |
Returns
Type | Description |
---|---|
System.Int32 |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
System.Object.ToString()
Extension Methods
EnumUtil.MapEnums<From, To>(From)