Database Dialects

March 10, 2026 ยท View on GitHub

What are database dialects?

The AWS Advanced JDBC Wrapper is a wrapper that requires an underlying driver, and it is meant to be compatible with any JDBC driver. Database dialects help the AWS Advanced JDBC Wrapper determine what kind of underlying database is being used. To function correctly, the AWS Advanced JDBC Wrapper requires details unique to specific databases such as the default port number or the method to get the current host from the database. These details can be defined and provided to the AWS Advanced JDBC Wrapper by using database dialects.

Configuration Parameters

NameRequiredDescriptionExample
wrapperDialectNo (see notes below)The dialect code of the desired database type.DialectCodes.AURORA_MYSQL or aurora-mysql

NOTES:

The wrapperDialect parameter is not required. When it is not provided by the user, the AWS Advanced JDBC Wrapper will attempt to determine which of the existing dialects to use based on other connection details. However, if the dialect is known by the user, it is preferable to set the wrapperDialect parameter because it will take time to resolve the dialect.

List of Available Dialect Codes

Dialect codes specify what kind of database any connections will be made to.

Dialect Code ReferenceValueDatabase
AURORA_MYSQLaurora-mysqlAurora MySQL
GLOBAL_AURORA_MYSQLglobal-aurora-mysqlAurora Global Database MySQL
RDS_MULTI_AZ_MYSQL_CLUSTERrds-multi-az-mysql-clusterAmazon RDS MySQL Multi-AZ DB Cluster Deployments
RDS_MYSQLrds-mysqlAmazon RDS MySQL
MYSQLmysqlMySQL
AURORA_PGaurora-pgAurora PostgreSQL
GLOBAL_AURORA_PGglobal-aurora-pgAurora Global Database PostgreSQL
RDS_MULTI_AZ_PG_CLUSTERrds-multi-az-pg-clusterAmazon RDS PostgreSQL Multi-AZ DB Cluster Deployments
RDS_PGrds-pgAmazon RDS PostgreSQL
PGpgPostgreSQL
MARIADBmariadbMariaDB
CUSTOMcustomSee custom dialects. This code is not required when using custom dialects.
UNKNOWNunknownUnknown. Although this code is available, do not use it as it will result in errors.

Custom Dialects

If you are interested in using the AWS Advanced JDBC Wrapper but your desired database type is not currently supported, it is possible to create a custom dialect.

To create a custom dialect, implement the Dialect interface. For Aurora Limitless database engines, the AuroraLimitlessDialect interface should also be implemented. See the following classes for examples:

  • PgDialect
    • This is a generic dialect that should work with any PostgreSQL database.
  • AuroraPgDialect
    • This dialect is an extension of PgDialect, but also implements the AuroraLimitlessDialect interface.

Once the custom dialect class has been created, tell the AWS Advanced JDBC Wrapper to use it with the setCustomDialect method in the DialectManager class. It is not necessary to set the wrawpperDialect parameter. See below for an example:

Dialect myDialect = new CustomDialect();
DialectManager.setCustomDialect(myDialect);