Package io.github.jdbcx
Interface DriverExtension
- All Superinterfaces:
Comparable<DriverExtension>
- All Known Implementing Classes:
BridgeDriverExtension,CodeQLDriverExtension,DbDriverExtension,DefaultDriverExtension,HelpDriverExtension,McpDriverExtension,PromptDriverExtension,PrqlDriverExtension,QueryDriverExtension,ScriptDriverExtension,ShellDriverExtension,VarDriverExtension,VersionDriverExtension,WebDriverExtension
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault intdefault JdbcActivityListenercreateListener(io.github.jdbcx.QueryContext context, Connection conn, Properties props) Creates a connection listener.static PropertiesextractProperties(DriverExtension extension, Properties properties) default PropertiesgetConfig(io.github.jdbcx.ConfigManager manager, Properties props) Deprecated.default PropertiesgetConfig(io.github.jdbcx.QueryContext context, Properties props) Gets configuration for this extension.default ConnectiongetConnection(io.github.jdbcx.ConfigManager manager, String url, Properties props) default PropertiesGets the default configuration for this extension, containing all supported options with their default values.default List<io.github.jdbcx.Option> Gets the default configuration options supported by this extension.default StringgetMatched(List<String> list, String pattern) default StringgetName()default List<io.github.jdbcx.Option> getOptions(Properties props) Gets the consolidated configuration options supported by this extension.getSchemas(io.github.jdbcx.ConfigManager manager, String pattern, Properties props) default ResultSetgetTables(io.github.jdbcx.ConfigManager manager, String schemaPattern, String tableNamePattern, String[] types, Properties props) default StringgetUsage()default booleanWhether this extension requires bridge context(e.g. current DB product, user, and bridge config etc.) or not.default booleandefault booleandefault booleanWhether this extension supports execution without passing any properties and content.
-
Field Details
-
PROPERTY_BRIDGE_URL
- See Also:
-
PROPERTY_BRIDGE_TOKEN
- See Also:
-
PROPERTY_PATH
- See Also:
-
PROPERTY_PRODUCT
- See Also:
-
PROPERTY_USER
- See Also:
-
DEFAULT_JDBC_TABLE_TYPE
- See Also:
-
JDBC_TABLE_FIELDS
-
-
Method Details
-
getMatched
-
extractProperties
-
createListener
default JdbcActivityListener createListener(io.github.jdbcx.QueryContext context, Connection conn, Properties props) Creates a connection listener.- Parameters:
context- query contextconn- connection to listenprops- connection properties, usually tailored for this extension- Returns:
- non-null connection listener
-
getName
-
getAliases
-
getConfig
Gets configuration for this extension.- Parameters:
context- optional query contextprops- optional properties to merge into the configuration, could be null- Returns:
- non-null configuration for this extension
-
getConfig
Deprecated.Gets configuration for this extension.- Parameters:
manager- optional configuration managerprops- optional properties to merge into the configuration, could be null- Returns:
- non-null configuration for this extension
-
getConnection
default Connection getConnection(io.github.jdbcx.ConfigManager manager, String url, Properties props) throws SQLException - Throws:
SQLException
-
getSchemas
default List<String> getSchemas(io.github.jdbcx.ConfigManager manager, String pattern, Properties props) -
getTables
default ResultSet getTables(io.github.jdbcx.ConfigManager manager, String schemaPattern, String tableNamePattern, String[] types, Properties props) throws SQLException - Throws:
SQLException
-
getDefaultConfig
Gets the default configuration for this extension, containing all supported options with their default values.- Returns:
- non-null default configuration
-
getOptions
Gets the consolidated configuration options supported by this extension.- Parameters:
props- optional connection properties, could benull- Returns:
- non-null configuration options supported by this extension
-
getDefaultOptions
Gets the default configuration options supported by this extension.- Returns:
- non-null default options
-
getDescription
-
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
-
requiresBridgeContext
default boolean requiresBridgeContext()Whether this extension requires bridge context(e.g. current DB product, user, and bridge config etc.) or not.- Returns:
- true if bridge context is required; false otherwise
-
compareTo
- Specified by:
compareToin interfaceComparable<DriverExtension>
-