Chapter 15. The ESQL Translator

Table of Contents
Compilation Process
Invocation of the GNU ESQL Translator (gesql)

Compilation Process

A ESQL module is either a package or a file containing only a single compilation unit (procedure). The file containing the Ada 95 code is read in by the translator which translates all ESQL statements into Ada 95 statements.

The name of the output file is generated by replacing the extension of the file name with ".adb". Any extension may be used, but by convention the extension ".adq" is used.

If you are using make, add the following lines to your makefile and process works automatically.

        .SUFFIXES: .adb .adq

                $(ESQL) $(ESQLFLAGS) $*.adq
The resulting adb file has to be compiled as it is well known using the GNAT.

Implementation Note: The generated code is based on a support package, which is used to interface with ODBC. All object names generated by the translator begin with the string GNADE_. It is strongly recommended to avoid such names in the application code in order to avoid an conflicts.