Menu

HowItWorks

Fragmatyc

How it works
On this page, you will find details about the architecture of SDFL. Like any language, SDFL starts with an interpreter. The interpreter parses the text source files into POJOs.

SDFL Interpreter
This is the easy part. Like I just said, the source files are parsed by the interpreter which creates POJO of every statements found in the code. Those are called SDFL statements that are runnable by the SDFL Executor.

The interpreter also performs the syntax validation. Any error found while parsing the source files are thrown and logged by the interpreter as ParsingException. Each Statement (POJO) contains the original code to help the user correct the code.

SDFL Compilers
SDFL has many different implementations of the compiler. The compiler is used to convert the Statement POJOs into proprietary SQL code based on the implementation of the compiler. For example, The OracleCompiler is used to create SQL and PL/SQL code from the Statement POJOs, and the MySQLCompiler does the same thing but targets the MySQL syntax.

Once the code is compiled in to SQL files, the compile builds a package to make the transfer and the deployment as easy as possible. Depending on the execution environment (OS and software installed), the compiler builds a standardized directory structure and an executor file. The executor file runs the package using the applications installed such as SQL*Plus or the SDFL Executor.

During compilation, any error occuring are logged as CompilerError.

SDFL+ Compiler
The SDFL+ compiler is one that has a larger set of statements. Some functions are not available in technology specific compilers and are implemented in the SDFL+ compiler such as logging, file transfer, emailing, etc.. This compiler also produces a cross-platform executable Java package intended to be used by the SDFL Executor. A copy of the executor is included in the package.

SDFL Executor
This is a standalone Java application intended to execute the package compiled by the SDFL+ Compiler. The executor is included in the package, that means the package kind of executes itself. In fact, the package produced by the SDFL+ compiler contains the executor and the Statement POJOs. The executor is triggered, loads and runs the statements.