Package io.github.jdbcx

# Interface DriverExtension

All Superinterfaces:
  `Comparable<DriverExtension>`

All Known Implementing Classes:
  `BlackholeDriverExtension`, `CodeQLDriverExtension`, `DbDriverExtension`, `DefaultDriverExtension`, `HelpDriverExtension`, `PromptDriverExtension`, `PrqlDriverExtension`, `ScriptDriverExtension`, `ShellDriverExtension`, `VarDriverExtension`, `VersionDriverExtension`, `WebDriverExtension`

public interface DriverExtension extends Comparable<DriverExtension>

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DEFAULT_JDBC_TABLE_TYPE`
`static final List<Field>`
`JDBC_TABLE_FIELDS`

## Method Summary

Modifier and Type
Method
Description
`default int`
`compareTo(DriverExtension o)`
`default JdbcActivityListener`
`createListener(QueryContext context, Connection conn, Properties props)`
Creates a connection listener.
`static Properties`
`extractProperties(DriverExtension extension, Properties properties)`
`default List<String>`
`getAliases()`
`default Properties`
`getConfig(String id)`
`default Properties`
`getConfig(Properties props)`
Gets configuration for this extension.
`default Connection`
`getConnection(String url, Properties props)`
`default Properties`
`getDefaultConfig()`
Gets the default configuration for this extension, containing all supported options with their default values.
`default List<Option>`
`getDefaultOptions()`
Gets the default configuration options supported by this extension.
`default String`
`getDescription()`
`static List<String>`
`getMatched(List<String> list, String pattern)`
`default String`
`getName()`
`default List<Option>`
`getOptions(Properties props)`
Gets the consolidated configuration options supported by this extension.
`default List<String>`
`getSchemas(String pattern, Properties props)`
`default ResultSet`
`getTables(String schemaPattern, String tableNamePattern, String[] types, Properties props)`
`default String`
`getUsage()`
`default boolean`
`hasConfig(String id)`
`default boolean`
`supportsDirectQuery()`
`default boolean`
`supportsInspection()`
`default boolean`
`supportsNoArguments()`
Whether this extension supports execution without passing any properties and content.

## Field Details

### DEFAULT_JDBC_TABLE_TYPE

static final String DEFAULT_JDBC_TABLE_TYPE

See Also:
  - Constant Field Values

### JDBC_TABLE_FIELDS

static final List<Field> JDBC_TABLE_FIELDS

## Method Details

### getMatched

static List<String> getMatched(List<String> list, String pattern)

### extractProperties

static Properties extractProperties(DriverExtension extension, Properties properties)

### createListener

default JdbcActivityListener createListener(QueryContext context, Connection conn, Properties props)
Creates a connection listener.

Parameters:
  `context` - query context
  `conn` - connection to listen
  `props` - connection properties, usually tailored for this extension
Returns:
  non-null connection listener

### getName

default String getName()

### getAliases

default List<String> getAliases()

### hasConfig

default boolean hasConfig(String id)

### getConfig

default Properties getConfig(String id)

### getConfig

default Properties getConfig(Properties props)
Gets configuration for this extension.

Parameters:
  `props` - optional properties to merge into the configuration, could be null
Returns:
  non-null configuration for this extension

### getConnection

default Connection getConnection(String url, Properties props) throws SQLException

Throws:
  `SQLException`

### getSchemas

default List<String> getSchemas(String pattern, Properties props)

### getTables

default ResultSet getTables(String schemaPattern, String tableNamePattern, String[] types, Properties props) throws SQLException

Throws:
  `SQLException`

### getDefaultConfig

default Properties getDefaultConfig()
Gets the default configuration for this extension, containing all supported options with their default values.

Returns:
  non-null default configuration

### getOptions

default List<Option> getOptions(Properties props)
Gets the consolidated configuration options supported by this extension.

Parameters:
  `props` - optional connection properties, could be null
Returns:
  non-null configuration options supported by this extension

### getDefaultOptions

default List<Option> getDefaultOptions()
Gets the default configuration options supported by this extension.

Returns:
  non-null default options

### getDescription

default String getDescription()

### getUsage

default String getUsage()

### supportsDirectQuery

default boolean supportsDirectQuery()

### supportsInspection

default boolean supportsInspection()

### supportsNoArguments

default boolean supportsNoArguments()
Whether this extension supports execution without passing any properties and content.

Returns:
  true if the extension supports execution without passing any properties and content; false otherwise

### compareTo

default int compareTo(DriverExtension o)

Specified by:
  `compareTo` in interface `Comparable<DriverExtension>`