duckdb / duckdb-java

DuckDB JDBC Driver
https://duckdb.org/docs/api/java.html
MIT License
20 stars 11 forks source link

Add case-insensitive getters on resultSet #40

Open egillax opened 2 weeks ago

egillax commented 2 weeks ago

I believe the getters for resultSet should be case insensitive:

Column names used as input to getter methods are case insensitive.

From here

I'm having an issue where I'm adding duckdb support to an application that already supports a number of other database systems through jdbc. There the results are always fetched like:

resultSet.getString('VERSION') 

for a column version. This currently doesn't work in duckdb.

Mause commented 2 weeks ago

Probably just needs a change here? https://github.com/duckdb/duckdb-java/blob/dedf7b7b6f9a9a66adb5292eea5587e4b076e84e/src/main/java/org/duckdb/DuckDBResultSet.java#L314

jghoman commented 1 week ago

Probably just needs a change here?

That worked. Added change and unit test.