Package io.github.jdbcx

# Interface JdbcDialect

All Known Implementing Classes:
  `ClickHouseDialect`, `DefaultDialect`, `DuckDBDialect`

public interface JdbcDialect

## Method Summary

Modifier and Type
Method
Description
`default String`
`getEncodings(Compression serverCompress)`
`ResultMapper`
`getMapper()`
`default String`
`getMimeTypes(Format serverFormat)`
`default Compression`
`getPreferredCompression()`
Gets preferred compression algorithm.
`default Format`
`getPreferredFormat()`
Gets preferred data format.
`default String`
`getRemoteTable(Connection conn, String url)`
Gets table representing the given URL.
`default ValueFactory`
`getValueFactory(Format format)`
`default VariableTag`
`getVariableTag()`
`default boolean`
`supportMultipleResultSetsPerStatement()`
Whether a `Statement` supports multiple `ResultSet` in open status.
`default boolean`
`supports(Compression compress)`
Checks if the compression algorithm is supported or not.
`default boolean`
`supports(Format format)`
Checks if the data format is supported or not.

## Method Details

### supports

default boolean supports(Compression compress)
Checks if the compression algorithm is supported or not.

Parameters:
  `compress` - non-null compression algorihtm
Returns:
  true if it's supported; false otherwise

### supports

default boolean supports(Format format)
Checks if the data format is supported or not.

Parameters:
  `format` - non-null data format
Returns:
  true if it's supported; false otherwise

### supportMultipleResultSetsPerStatement

default boolean supportMultipleResultSetsPerStatement()
Whether a `Statement` supports multiple `ResultSet` in open status.

Returns:
  true multiple ResultSets are supported; false otherwise

### getPreferredCompression

default Compression getPreferredCompression()
Gets preferred compression algorithm.

Returns:
  non-null compression algorithm

### getPreferredFormat

default Format getPreferredFormat()
Gets preferred data format.

Returns:
  non-null data format

### getEncodings

default String getEncodings(Compression serverCompress)

### getMimeTypes

default String getMimeTypes(Format serverFormat)

### getVariableTag

default VariableTag getVariableTag()

### getValueFactory

default ValueFactory getValueFactory(Format format)

### getMapper

ResultMapper getMapper()

### getRemoteTable

default String getRemoteTable(Connection conn, String url) throws SQLException
Gets table representing the given URL. This is typically used in a query like shown below.

     select * from {{ table.db.mysql1: select 1 }}

The inner query will be translated to `'http://bridge-server:8080/<uuid>.csv'` by default. This various on different databases, for examples:

- On DuckDB, it's `read_csv('http://bridge-server:8080/<uuid>.csv', auto_detect=true)`
- On ClickHouse, url table function will be used, so it becomes `url('http://bridge-server:8080/<uuid>.csv', 'CSVWithNames')`

Parameters:
  `conn` - connection
  `url` - url
Returns:
  table representing the given URL
Throws:
  `SQLException`