ODBC and JDBC specifications define escape sequences to standardize syntax for the data source-specific features, such as timestamps, joins, LIKE predicates, scalar functions and procedure calls. Escape sequences simplify the data consumer application logic by allowing them to use the same syntax for accessing different data sources which may not fully support the SQL standard. While it’s a big help for data consumer application developers, ODBC and JDBC driver developers need to parse the commands generated by the data consumer and implement the data source-specific syntax for the escape sequences.

The SimbaEngine SDK already allows the parsing of queries into language components and presenting it to driver developers as an Abstract Syntax Tree (AST). This parser offers a universal and powerful API for working with commands, but in the case of SQL-enabled data sources, developers often need only a simple parsing for the escape sequences only.

To address this need, SimbaEngine X update 10.0.4 adds a new MiniParser feature for escape sequences.

The new mini parser provides a very simple and lightweight API for parsing an SQL command for escape sequences and then replacing them with the command format understood by their data store. Mini parser requires less coding and simplifies driver development for SQL-enabled data sources. All escape sequences defined by the standard are supported.

Using the parser, it is easy for your driver to translate SQL commands containing complex, nested escape sequences into a format that your data store understands. The parser supports nested escape sequences, and you can find the sample code included with the SDK.

Now is your turn

To get the mini parser, download the updated version of SimbaEngine X today.