-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Description
The JDBC Javadoc of DatabaseMetaData.getFunctions(…)
said:
schemaPattern
- a schema name pattern; must match the schema name as it is stored in the database; "" retrieves those without a schema; null means that the schema name should not be used to narrow the search
Therefore, setting the schemaPattern
argument to null
in the following code snippet should return all functions. However, that code prints nothing with DuckDB 1.2.1:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
public class TestDuckDB {
public static void main(String[] args) throws Exception {
try (Connection c = DriverManager.getConnection("jdbc:duckdb:/...something.db")) {
try (ResultSet r = c.getMetaData().getFunctions(null, null, "%")) {
while (r.next()) {
System.out.println(r.getString("FUNCTION_NAME"));
}
}
}
}
}
If we replace the schemaPattern
argument (the last null
) by "%"
in the call to getFunctions(…)
, it works. The fix for this issue may be simply to replace null
by "%"
internally in the JDBC driver.
Metadata
Metadata
Assignees
Labels
No labels