You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Doc issue? What is the proper way of using JDBC PreparedStatement with STRUCT and/or MAP? #208
I have looked into the code and the DuckDBConnection class has methods like createMap() and createStruct(). The DuckDBPreparedStatement.setObject() does not reveal anything either.
Thanks for the report! Yes, I agree that documentation about createMap() (and other DuckDB-specific extensions like createAppender()) is lacking. The intention about such extensions is to cover them with JavaDoc and publish it to be used in addition to generic JDBC JavaDoc, but this is not yet done.
Full example with MAP insert/fetch just if someone stumble upon the same topic:
Activity
staticlibs commentedon May 2, 2025
@wernerdaehn
Thanks for the report! Yes, I agree that documentation about
createMap()(and other DuckDB-specific extensions likecreateAppender()) is lacking. The intention about such extensions is to cover them with JavaDoc and publish it to be used in addition to generic JDBC JavaDoc, but this is not yet done.Full example with
MAPinsert/fetch just if someone stumble upon the same topic:It is easier with createStruct and createArrayOf because these ones are generic JDBC methods. Example of their usage can be seen in spatial extension tests.
PS: Appender improvements are planned, it is the next major task in JDBC, but it is not making it into upcoming 1.3 release.
staticlibs commentedon Sep 25, 2025
Just for the record, with #399 Appender now supports
MAPand nestedSTRUCTs.