Skip to content

Commit

Permalink
#154: Updated dialect registration.
Browse files Browse the repository at this point in the history
  • Loading branch information
redcatbear committed May 3, 2019
1 parent baf12c0 commit 5512b6e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
15 changes: 15 additions & 0 deletions doc/development/developing_a_dialect.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@ This repository contains Maven sub-projects that are structured as follows.
jdbc-adapter Parent project and integration test framework
|
|-- virtualschema-jdbc-adapter The actual implementation files
| |
| |-- src
| | |
| | |-- main
| | | |
| | | |-- java Productive code
| | | |
| | | '-- resources Productive resources (e.g. service loader configuration)
| | |
| | '-- test
| | |
| | |-- java Unit and integration tests
| | |
| | '-- resources Test resources
| ...
|
'-- virtualschema-jdbc-adapter-dist Environment for creating the all-in-one adapter JAR

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ public AthenaSqlDialect(final Connection connection, final AdapterProperties pro

Add the fully qualified class name `com.exasol.adapter.dialects.athena.AthenaSqlDialect` to the file `src/main/resources/sql_dialects.properties` so that the class loader can find your new dialect adapter.

The following step is still necessary by the time of this writing, but will soon be obsoleted and replaced by automatic discovery..

In `com.exasol.adapter.jdbc.JdbcAdapter/adapterCall(ExaMetadata, String)` add the following line:

```java
registerAdapterForSqlDialect(adapter, "ATHENA");
```
Add the dialect name (here `ATHENA`) to the list of dialects for which the `JbdcAdapterFactory` is responsible in the method `getSupportedAdapterNames()`;

Create an empty unit test class for the dialect: `com.exasol.adapter.dialects.athena.AthenaSqlDialectTest` that tests class `AthenaSqlDialectTest`.

Expand Down

0 comments on commit 5512b6e

Please sign in to comment.