Skip to content

TSQLSequence

Support for applying sequences to fields.

Declaration

Source position: sqldb.pp line 466

type

  TSQLSequence = class(TPersistent)
  public
    constructor Create;
    procedure Assign;
    procedure Apply;
    function GetNextValue : Int64;
  published
    property FieldName: string; {rw}
    property SequenceName: string; {rw}
    property IncrementBy: Integer; {rwd}
    property ApplyEvent: TSQLSequenceApplyEvent; {rwd}
  end;

Description

TSQLSequence is an auxiliary class, used to auto-generate numerical values for fields in databases that support sequences; it is used as a property of TSQLQuery and its properties determine which field must be auto-generated, and at what moment this value must be generated.

Properties

Member Visibility Description
ApplyEvent published When to apply the new value.
FieldName published Field to apply sequence to.
IncrementBy published Value to increment sequence with.
SequenceName published Sequence name to get values from.
See all Properties

Methods

Member Visibility Description
Apply public Apply a new value to a field.
Assign public Assign one TSQLSequence to another.
Create public Create a new instance.
GetNextValue public Get a next value for the sequence.
See all Methods

See also

Name Description
TSQLConnection.GetSequenceNames Return a list of sequence names.
TSQLConnection.GetNextValue Get next value for a sequence.