Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appender - support all appends #110

Open
ryanhamilton opened this issue Dec 11, 2024 · 0 comments
Open

Appender - support all appends #110

ryanhamilton opened this issue Dec 11, 2024 · 0 comments

Comments

@ryanhamilton
Copy link

I'm currently using batch insert statements to insert data to duckdb from java. As specified in the docs:

The preferred method for bulk inserts is to use the Appender due to its higher performance. However, when using the Appender is not possbile, the batch writer is available as alternative.

Unfortunately some of my data are dates / times and nested arrays.
Could duckdb_append_date/duckdb_append_time be exposed in java?
and a method of adding arrays?
It would be nice to be able to say appender.append(new int[]{3,2,1}); or similar for each data type.

DuckDB C API

duckdb_state [duckdb_append_date](https://duckdb.org/docs/api/c/appender#duckdb_append_date)(duckdb_appender appender, duckdb_date value);
duckdb_state [duckdb_append_time](https://duckdb.org/docs/api/c/appender#duckdb_append_time)(duckdb_appender appender, duckdb_time value);
duckdb_state [duckdb_append_interval](https://duckdb.org/docs/api/c/appender#duckdb_append_interval)(duckdb_appender appender, duckdb_interval value);
duckdb_state [duckdb_append_blob](https://duckdb.org/docs/api/c/appender#duckdb_append_blob)(duckdb_appender appender, const void *data, idx_t length);
duckdb_state [duckdb_append_data_chunk](https://duckdb.org/docs/api/c/appender#duckdb_append_data_chunk)(duckdb_appender appender, duckdb_data_chunk chunk);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant