Doc issue? What is the proper way of using JDBC PreparedStatement with STRUCT and/or MAP?
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- databases, documentation
Research direction
Start with the DuckDBConnection createMap() and createStruct() methods and DuckDBPreparedStatement.setObject(), then review the JDBC client documentation. Add examples showing the proper use of PreparedStatement with MAP and STRUCT values, based on the Map example in the issue, and ensure both cases are covered.
Written by the indexing model from the issue text.
Description
I have looked into the code and the DuckDBConnection class has methods like createMap() and createStruct(). The DuckDBPreparedStatement.setObject() does not reveal anything either.
This is what I ended up with for Map:
CREATE TABLE "commit" ("commit_id" VARCHAR, "producer_name" VARCHAR, "topic_name" VARCHAR,
"commit_epoch_ns" BIGINT, "record_count" INTEGER, "max_offsets" MAP(VARCHAR, BIGINT));
insertstmt.setObject(fieldpos, conn.createMap("MAP(VARCHAR,BIGINT)", new HashMap<>()));
Would be good to add examples to the JDBC client documentation.
- Dominant language
- C++
- Stars
- 127
- Forks
- 81
- Avg merge
- 7h 57m
- Merged PRs (30d)
- 38
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from duckdb/duckdb-java
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
duckdb/duckdb-java#832 · 2 comments ·
Maintainers usually reply within 1 day
-
Native SIGSEGV in DuckDB JDBC when repeatedly executing queries with window functions and LIMIT 0Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-java#871 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
duckdb/duckdb-java#872 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
duckdb/duckdb-java#837 ·
Maintainers usually reply within 1 day
-
executeBatch()` on a prepared INSERT runs s are ~1–2 orders of magnitude slower than the AppenderOpen
Difficulty 5/5 Over a week Newbie friendliness 42/100
duckdb/duckdb-java#815 · 1 comment ·
Maintainers usually reply within 1 day
All issues in duckdb/duckdb-java
Similar issues
-
upstream update
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conan-io/conan-center-index#31098 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ml-explore/mlx-c#136 ·
-
bug chart-audit
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day