JDBC Drivers and Translators

Adding a JDBC Driver

To add a new JDBC driver to Ignition, do the following steps:

  1. In Gateway on the Configure page, click on Databases > Drivers.
    The Database Drivers & Settings page is displayed.

  2. Find the orange arrow and click on the Create new JDBC Driver... link.

  3. In the Name field, type the full name of the JDBC driver, see the manufacturer's documentation to get the name.

  4. In the JAR File(s) field, specify the core Java JAR file that contains the driver, as well as any other required JARs.

  5. Use the default settings for the following properties:

    Driver Defaults and Instructions

    Driver Type

    Is the brand of database. This is used for optimizations in the Gateway, if in doubt, select GENERIC.

    URL Format

    Is a default value for the connect URL. This provides a hint to the format of the connect URL that this driver requires while adding a datasource connection. For example, the hint for the format can be, jdbc:dbtype://host:port/database

    URL Instructions

    Free form instructions that are shown to help the user to create a connection.

    Default Connection
    Properties

    Any additional properties to add by default to the connection string.

    Connection Properties
    Instructions

    Tips about which connection properties might be useful.

    Default Validation
    Query

    The default query that is used to verify that the connection is available.

    SQL Language Compatibility

    Default Translator

    The database translator that is used by default for connections from this driver.

  6. Click the Create New JDBC Driver button, located at the very bottom of the page, to create the new driver.

Database Translators

Despite the presence of a SQL standard, many database system vary in how they implement or accomplish various tasks. The JDBC driver system tries to hide these differences as much as possible, but unfortunately some differences persist.

The database translator system in Ignition navigates these differences as they apply to the system. It provides a way to define certain key operations that are commonly different between database vendors, such as creating auto-incrementing index columns, and the keywords used for different data types.

Translator Management

Database translators are managed in the Gateway from the Databases > Drivers > Translators tab. Ignition comes pre-configured with translators for the major supported databases, but you can edit and remove them, as well as create new translators. It is necessary to create a new translator only when adding a new JDBC driver for a database that does not share syntax with any of the existing translators.

Creating a New Translator

To add a new database translator to Ignition, do the following steps:

  1. In Gateway on the Configure page, click on Databases > Drivers.
    The Database Drivers & Settings page is displayed.

  2. Go to the Translators tab, find the orange arrow, and click on the Create new Database Translator... link.
    The New Database Translator page is displayed showing a list of all the translator properties.

  3. Define the tokens used with the translator properties on the New Database Translator page.

    For most of the properties, you need to define special token markers to indicate places where other values are placed. For example, the default Create Table Syntax entry looks as follows:

    CREATE TABLE {tablename} ({creationdef}{primarykeydef})
    Where:tablename, creationdef, and primarykeydef are all tokens that are expanded. tablename is replaced directly with the table, creationdef is a list of columns, and primarykeydef is the phrase created by the Primary Key Syntax entry in the translator.
    The possible tokens are as follows:

    Token
    Description

    tablename

    The name of the table being created.

    indexname

    The name of the index to create, when adding a column index to the table.

    primarykeydef

    A clause that defines a primary key for a new table.

    creationdef

    The list of columns to create in the table.

    alterdef

    A list of columns to add/remove/modify in the table.

    columnname

    The name of a column.

    type

    The data type of a column.

    limit

    The value of the limit clause.

    Other Properties

    Limit Position

    Defines where the limit clause should be placed. Back, the limit is placed at the end of the query. Front, places it directly after the SELECT keyword.

    Column Quote Character

    All columns are created and accessed with the defined quote, which tells the database to use a specific casing, as well as avoiding collisions between the column name and database keywords.

    Supports Returning Auto-generated Keys? /
    Fetch Key Query

    Indicates whether the JDBC driver supports the return of generated keys. If the driver does not support this feature, the Fetch Key Query is used to retrieve the last key.

    Date Type Mapping

    All data types

    The keywords that are used when creating columns of the given types.

  4. Click the Create New Database Translator button, located at the very bottom of the page, to create the translator.