Skip to content

DuckDBJ: org.duckdb.DuckDBDatabaseMetaData.supportsLikeEscapeClause() returns false - should be true #6157

@rpbouman

Description

@rpbouman

What happens?

Method supportsLikeEscapeClause() of org.duckdb.DuckDBDatabaseMetaData always returns false (https://github.com/duckdb/duckdb/blob/master/tools/jdbc/src/main/java/org/duckdb/DuckDBDatabaseMetaData.java#L269)

According to Javadoc of java.sql.DatabaseMetaData (https://docs.oracle.com/en/java/javase/11/docs/api/java.sql/java/sql/DatabaseMetaData.html#supportsLikeEscapeClause()) semantics of method supportsLikeEscapeClause() is:

"Retrieves whether this database supports specifying a LIKE escape clause."

Duckdb supports the LIKE escape clause (see: https://duckdb.org/docs/sql/functions/patternmatching#like) so supportsLikeEscapeClause() should return true.

To Reproduce

	public static void test_supportsLikeEscapeClause_shouldBe_true() throws Exception {
		Connection conn = DriverManager.getConnection("jdbc:duckdb:");
		DatabaseMetaData databaseMetaData = connection.getMetaData();
		assertTrue(
			"DatabaseMetaData.supportsLikeEscapeClause() should be true.",
			databaseMetaData.supportsLikeEscapeClause()
		);
	}

OS:

Windows 10 Pro

DuckDB Version:

v0.6.2-dev2100

DuckDB Client:

DuckDBJ (jdbc)

Full Name:

Roland Bouman

Affiliation:

Just-Bi.nl (an EPAM company)

Have you tried this on the latest master branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions