Table of Contents

ISQLGenerator.GetSqlLiteral Method

Converts a Delphi variant value to its SQL literal representation for the given field type.

Syntax

Unit: Aurelius.Sql.Interfaces

function ISQLGenerator.GetSqlLiteral(AValue: Variant; AType: TFieldType): string; virtual; abstract;

Parameters

<-> Parameter Type Description
AValue Variant The Delphi value to convert.
AType TFieldType The field type that governs the formatting rules (e.g., quoting for strings, date formatting, boolean literals).

Returns

The SQL literal string (e.g., 'hello', 42, NULL).

See also