Definition at line 7 of file QueryContext.Sequences.cs.
Gets the current value of the sequence.
- Parameters
-
context | |
sequenceName | The name of the sequence whose current value must be obtained. |
- Returns
- Returns a SqlNumber that represents the current value of the sequence identified by the given name.
- Exceptions
-
Definition at line 46 of file QueryContext.Sequences.cs.
47 var sequence = context.GetSequence(sequenceName);
49 throw new InvalidOperationException(
String.Format(
"Sequence {0} was not found.", sequenceName));
51 return sequence.GetCurrentValue();
A long string in the system.
Increments the sequence and returns the computed value.
- Parameters
-
context | |
sequenceName | The name of the sequence to increment and whose incremented value must be returned. |
- Returns
- Returns a SqlNumber that represents the result of the increment operation over the sequence identified by the given name.
- Exceptions
-
Definition at line 25 of file QueryContext.Sequences.cs.
26 var sequence = context.GetSequence(sequenceName);
28 throw new InvalidOperationException(
String.Format(
"Sequence {0} was not found.", sequenceName));
30 return sequence.NextValue();
A long string in the system.
Definition at line 8 of file QueryContext.Sequences.cs.
DbObjectType
The kind of objects that can be handled by a database system and its managers
Sets the current value of the sequence, overriding the increment mechanism in place.
- Parameters
-
sequenceName | The name of the sequence whose current state to be set. |
value | The numeric value to set. |
- Exceptions
-
Definition at line 64 of file QueryContext.Sequences.cs.
65 var sequence = context.GetSequence(sequenceName);
67 throw new InvalidOperationException(
String.Format(
"Sequence {0} was not found.", sequenceName));
69 sequence.SetValue(value);
A long string in the system.
The documentation for this class was generated from the following file: