Interface SqlDialectFactory

  • All Superinterfaces:
    AutoCloseable

    public interface SqlDialectFactory
    extends AutoCloseable
    This is the common interface for all factories that produce SQL dialects. *

    Note that this classes derived from this class must be registered in a resource file called META-INF/services/com.exasol.adapter.dialects.SqlDialectFactory in order for the ServiceLoader to find it.

    • Method Detail

      • getSqlDialectName

        String getSqlDialectName()
        Get the name of the SQL dialect this factory creates, e.g. MYSQL, POSTGRESQL or EXASOL.
        Returns:
        SQL dialect name
      • getAdapterProjectShortTag

        String getAdapterProjectShortTag()
        Get a short tag for the adapter project. This will be used for telemetry to identify products.

        Please make sure that this is the same short tag as in file error_code_config.yml of each adapter project.

        Example values: VSMYSQL, VSPG (Postgres VS), VSEXA, VSDY (DynamoDB VS), VSS3, VSADLG2

        Returns:
        short tag for the adapter project
      • getSqlDialectVersion

        String getSqlDialectVersion()
        Get the version of the SqlDialect. This version will be used for logging and telemetry.

        Adapters can use VersionCollector to fetch the version from the metadata in the jar file. For example:

         new VersionCollector("META-INF/maven/com.exasol/mysql-virtual-schema/pom.properties").getVersionNumber()
         
        Returns:
        Virtual Schema Adapter version
      • close

        default void close()
        Close the factory and release any resources.
        Specified by:
        close in interface AutoCloseable