Conversion Language

Performing code conversion with traditional tools is similar to developing applications using IDE wizards only. You can easily convert simple code, but there is no enough flexibility and options when it comes to real-world databases and applications.

As a result, developers often start developing own tools to automate some conversions, and refine the conversion manually that is often time-consuming.

At the same time, it does not seem possible to develop a tool that provides enough UI options or configuration settings to meet all requirements for migrating enterprise databases and applications containing thousands or millions lines of code (SQL, embedded SQL, API, C/C++ etc).

A solution is to provide a high level conversion language optimized for migration tasks and that allows fast development and customization such as:

 { 
   NVL2($exp1, $exp2, $exp3) 
=> 
   CASE WHEN $exp1 IS NOT NULL THEN $exp2 ELSE $exp3 END
 }

For more examples, see Tutorial below.

You can also find more advanced examples in templates directory of SQLines tool (available at Download) or Language Reference

What You Can Do

The SQLines conversion language allows you to:

  • Develop general conversion templates and use them in all further migration projects
  • Customize conversion for specific projects only
  • Automatically refine conversion that was done by other tools
  • Collect various information from source code for assessment, reports and performance optimization
  • “Record” actions (of any kind) to automate the migration process as much as possible
  • Generate testing scripts

Internals at a Glance

The conversion language is based on pattern matching, regular expressions, flow-of-contol statements, grammar helpers and built-in functions that are optimized for SQL and application code conversion tasks.

During code conversion, SQLines recognizes blocks, understands variable scopes, expression and function nesting, allows you to set attributes for further checking and processing.

Many language elements are very similar to C/C++ (and C#, Java and PHP as a result) and simplified BNF notation that is used in SQL Reference for almost any database. More...

Design Goals

Language syntax and built-in features are driven by the following design goals:

  • Using in enterprise migrations, meeting strict and diverse requirements and converting large volumes of code

  • Fast and productive development and customization with no need to recompile the engine code and without contacting SQLines developers

  • As easy as SQL - Easy to learn and understand

  • Readable and Maintainable Code

  • What you see is what you convert - there is no need to deal with abstract trees and complex grammars representing converted code when you develop conversion templates

  • Reliable and strict conversion - providing language features to restrict and scope the conversion

  • Convert any code (partial, uncompleted, containing syntax errors or non-standard preprocessors etc). This can be helpful when you need to refine the conversion that was done by other tools

  • Fast performance on large number of files and lines of code