TSQLScript.UseDefines property
Automatically handle pre-processor defines.
Declaration
property UseDefines:;Description
UseDefines will automatically register the following
pre-processing directives:
#IFDEF #IFNDEF #ELSE #ENDIF #DEFINE #UNDEF #UNDEFINE
Additionally, these directives will be automatically handled by the
TSQLScript component. This can be used to add conditional execution
of the SQL script: they are treated as the conditional compilation
statements found in the C macro preprocessor or the FPC conditional
compilation features. The initial list of defined macros can be specified in
the Defines property, where one define
per line can be specified.
In the following example, the correct statement to create a sequence is
selected based on the presence of the macro FIREBIRD in the list
of defines:
#IFDEF FIREBIRD CREATE GENERATOR GEN_MYID; #ELSE CREATE SEQUENCE GEN_MYID; #ENDIF
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
