TDABaseOrderByCollection

Overview

TDABaseOrderByCollection is a part of TDAQueryBuilder that specifies how to fields should be sorted. Also it contains method that generate ORDER BY statement

You shoudn't use this class directly because it is used in TDAQueryBuilder.GenerateSelectSQL:

procedure TForm1.Button1Click(Sender: TObject);
var
  qb: TDASQL92QueryBuilder;
begin
  qb := TDASQL92QueryBuilder.Create;
  try
    qb.MainTable.MasterTable := 'MERCHANDISE';
    qb.AddSelect('MERCHANDISE','DESCRIPTION');
    qb.AddOrderBy('MERCHANDISE','DESCRIPTION',True);
    Memo1.Lines.Text:= qb.GenerateSelectSQL;
  finally
    qb.free;
  end;
end;

Location

 

constructor Create (TDASimpleQueryBuilder)  reintroduce overload

Creates a new instance and allows to use existing aQueryBuilder.FieldGenerator

constructor Create(aQueryBuilder: TDASimpleQueryBuilder)

Parameters:

  • aQueryBuilder: query builder

Assign  override

Copies data from a given source.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

AssignOrderByCollection  virtual

Copies the contents of another collection to the object where the method is executed.

procedure AssignOrderByCollection(Source: TDABaseOrderByCollection)

Parameters:

  • Source: Instance whose properties will be copied

FieldGenerator

Referense to TDABaseFieldGenerator that contains rules for generating field name

property FieldGenerator: TDABaseFieldGenerator read write

GenerateOrderByStatement

Generates ORDER BY statement.

function GenerateOrderByStatement: string

OwnFieldGenerator

Uses own generator or not

property OwnFieldGenerator: Boolean read write

 

FieldGenerator

Referense to TDABaseFieldGenerator that contains rules for generating field name

property FieldGenerator: TDABaseFieldGenerator read write

OwnFieldGenerator

Uses own generator or not

property OwnFieldGenerator: Boolean read write

 

constructor Create (TDASimpleQueryBuilder)  reintroduce overload

Creates a new instance and allows to use existing aQueryBuilder.FieldGenerator

constructor Create(aQueryBuilder: TDASimpleQueryBuilder)

Parameters:

  • aQueryBuilder: query builder

Assign  override

Copies data from a given source.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

AssignOrderByCollection  virtual

Copies the contents of another collection to the object where the method is executed.

procedure AssignOrderByCollection(Source: TDABaseOrderByCollection)

Parameters:

  • Source: Instance whose properties will be copied

GenerateOrderByStatement

Generates ORDER BY statement.

function GenerateOrderByStatement: string

Descendants