Package com.exasol.adapter.dialects
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.SqlDialectFactoryin order for theServiceLoaderto find it.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()Close the factory and release any resources.SqlDialectcreateSqlDialect(JDBCAdapterContext context)Create a newSqlDialect.StringgetAdapterProjectShortTag()Get a short tag for the adapter project.StringgetSqlDialectName()Get the name of the SQL dialect this factory creates, e.g.StringgetSqlDialectVersion()Get the version of theSqlDialect.
-
-
-
Method Detail
-
createSqlDialect
SqlDialect createSqlDialect(JDBCAdapterContext context)
Create a newSqlDialect.- Parameters:
context- the context for the SQL dialect- Returns:
- new
SqlDialectinstance
-
getSqlDialectName
String getSqlDialectName()
Get the name of the SQL dialect this factory creates, e.g.MYSQL,POSTGRESQLorEXASOL.- 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.ymlof 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 theSqlDialect. This version will be used for logging and telemetry.Adapters can use
VersionCollectorto 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:
closein interfaceAutoCloseable
-
-