TDABaseFieldGenerator
Overview
TDABaseFieldGenerator is a part of TDAQueryBuilder infrastructure for generating select SQL.
This class is used automatically by TDAQueryBuilder.
Location
- Unit: uDASimpleQueryBuilder.pas
- Ancestry: TPersistent | TDABaseFieldGenerator
constructor Create reintroduce overload
Creates a new instance.
constructor Create
constructor Create (TDASimpleQueryBuilder) reintroduce overload
Creates a new instance with given parameter.
constructor Create(AQueryBuilder: TDASimpleQueryBuilder)
Parameters:
- AQueryBuilder: query builder
AlwaysQuoteFieldName
Changes the behavior of QuoteFieldNameIfNeeded method.
property AlwaysQuoteFieldName: Boolean read write
Assign override
Copies the contents of another instance to the object where the method is executed
procedure Assign(Source: TPersistent)
Parameters:
- Source: Instance whose properties will be copied
ColumnMapping
property ColumnMapping: TDAColumnMappingCollection read write
GenerateFieldName
Generates field name according to column mapping and quotation.
function GenerateFieldName(aTablename: string; aFieldName: string; aProcessMapping: Boolean): string
Parameters:
- aTablename: table name
- aFieldName: field name
- aProcessMapping: Controls if GetMappingTableField is applied to
aFieldName
. true by default.
GetMappingTableField protected
Returns correspondent name from column mapping.
function GetMappingTableField(const aDataSetField: string): string
Parameters:
- aDataSetField: dataset field
IdentifierNeedsQuoting protected virtual
Checks if identifier need to be quoted.
function IdentifierNeedsQuoting(const iIdentifier: string): Boolean
Parameters:
- iIdentifier: identifier.
QuoteFieldNameIfNeeded protected virtual
Quotes field name if is required.
function QuoteFieldNameIfNeeded(const aTableName: string; const aFieldName: string): string
Parameters:
- aTableName: table name.
- aFieldName: field name.
QuoteIdentifier protected virtual
Quotes identifier.
function QuoteIdentifier(const iIdentifier: string): string
Parameters:
- iIdentifier: identifier.
QuoteIdentifierIfNeeded protected virtual
Quotes identifier if is required.
function QuoteIdentifierIfNeeded(const iIdentifier: string): string
Parameters:
- iIdentifier: identifier.
AlwaysQuoteFieldName
Changes the behavior of QuoteFieldNameIfNeeded method.
property AlwaysQuoteFieldName: Boolean read write
ColumnMapping
property ColumnMapping: TDAColumnMappingCollection read write
constructor Create reintroduce overload
Creates a new instance.
constructor Create
constructor Create (TDASimpleQueryBuilder) reintroduce overload
Creates a new instance with given parameter.
constructor Create(AQueryBuilder: TDASimpleQueryBuilder)
Parameters:
- AQueryBuilder: query builder
Assign override
Copies the contents of another instance to the object where the method is executed
procedure Assign(Source: TPersistent)
Parameters:
- Source: Instance whose properties will be copied
GenerateFieldName
Generates field name according to column mapping and quotation.
function GenerateFieldName(aTablename: string; aFieldName: string; aProcessMapping: Boolean): string
Parameters:
- aTablename: table name
- aFieldName: field name
- aProcessMapping: Controls if GetMappingTableField is applied to
aFieldName
. true by default.
GetMappingTableField protected
Returns correspondent name from column mapping.
function GetMappingTableField(const aDataSetField: string): string
Parameters:
- aDataSetField: dataset field
IdentifierNeedsQuoting protected virtual
Checks if identifier need to be quoted.
function IdentifierNeedsQuoting(const iIdentifier: string): Boolean
Parameters:
- iIdentifier: identifier.
QuoteFieldNameIfNeeded protected virtual
Quotes field name if is required.
function QuoteFieldNameIfNeeded(const aTableName: string; const aFieldName: string): string
Parameters:
- aTableName: table name.
- aFieldName: field name.
QuoteIdentifier protected virtual
Quotes identifier.
function QuoteIdentifier(const iIdentifier: string): string
Parameters:
- iIdentifier: identifier.
QuoteIdentifierIfNeeded protected virtual
Quotes identifier if is required.
function QuoteIdentifierIfNeeded(const iIdentifier: string): string
Parameters:
- iIdentifier: identifier.