All Known Implementing Classes:
ClickhouseUrlParser, DataDirectUrlParser, Db2UrlParser, DerbyUrlParser, GenericUrlParser, H2UrlParser, HsqlUrlParser, InformixDirectUrlParser, InformixSqliUrlParser, JtdsUrlParser, LindormUrlParser, MssqlUrlParser, MysqlUrlParser, OceanbaseUrlParser, OracleUrlParser, PolardbUrlParser, PostgresqlUrlParser, SapUrlParser

public interface JdbcUrlParser
Interface for JDBC URL parsers.

IMPORTANT: Implementations should expect that JDBC URLs passed to the parse(String, ParseContext) method have been lowercased by the caller. URL parameter names should be checked using lowercase keys (e.g., "user", "servername", "databasename").

This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    parse(String jdbcUrl, ParseContext ctx)
    Parse the JDBC URL and populate the context with extracted information.
  • Method Details

    • parse

      void parse(String jdbcUrl, ParseContext ctx)
      Parse the JDBC URL and populate the context with extracted information.

      Implementations are responsible for the full parsing lifecycle:

      1. Set driver-specific defaults (system name, default host/port/user)
      2. Call ParseContext.applyDataSourceProperties() or ParseContext.applyUserProperty() at the appropriate point to match driver-specific precedence semantics. Use applyUserProperty() for drivers whose DataSource does not support the standard serverName/portNumber/databaseName properties.
      3. Parse the URL structure

      The placement of ParseContext.applyDataSourceProperties() controls precedence:

      • Before URL parsing: URL values take precedence (e.g., PostgreSQL, MySQL, Oracle)
      • After URL parsing: DataSource properties take precedence (e.g., Microsoft SQL Server)
      Parameters:
      jdbcUrl - the JDBC URL to parse (without the "jdbc:" prefix)
      ctx - the parse context containing type and optional DataSource properties