Package io.github.jdbcx
Interface JdbcDialect
- All Known Implementing Classes:
ClickHouseDialect,DefaultDialect,DuckDBDialect
public interface JdbcDialect
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetEncodings(io.github.jdbcx.Compression serverCompress) default StringgetMimeTypes(io.github.jdbcx.Format serverFormat) default io.github.jdbcx.CompressionGets preferred compression algorithm.default io.github.jdbcx.FormatGets preferred data format.default StringgetRemoteTable(Connection conn, String url) Gets table representing the given URL.default io.github.jdbcx.ValueFactorygetValueFactory(io.github.jdbcx.Format format) default io.github.jdbcx.VariableTagdefault booleandefault booleansupports(io.github.jdbcx.Compression compress) Checks if the compression algorithm is supported or not.default booleansupports(io.github.jdbcx.Format format) Checks if the data format is supported or not.
-
Method Details
-
supports
default boolean supports(io.github.jdbcx.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(io.github.jdbcx.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()- Returns:
- true multiple ResultSets are supported; false otherwise
-
getPreferredCompression
default io.github.jdbcx.Compression getPreferredCompression()Gets preferred compression algorithm.- Returns:
- non-null compression algorithm
-
getPreferredFormat
default io.github.jdbcx.Format getPreferredFormat()Gets preferred data format.- Returns:
- non-null data format
-
getEncodings
-
getMimeTypes
-
getVariableTag
default io.github.jdbcx.VariableTag getVariableTag() -
getValueFactory
default io.github.jdbcx.ValueFactory getValueFactory(io.github.jdbcx.Format format) -
getMapper
ResultMapper getMapper() -
getRemoteTable
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- connectionurl- url- Returns:
- table representing the given URL
- Throws:
SQLException
- On DuckDB, it's
-