diff --git a/Makefile b/Makefile index 381a3729..7227d21a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ DUCKDB_REPO=https://github.com/duckdb/duckdb.git -DUCKDB_BRANCH=v0.10.2 +DUCKDB_BRANCH=v0.10.3 .PHONY: install install: diff --git a/deps/darwin_amd64/libduckdb.a b/deps/darwin_amd64/libduckdb.a index 58f9a454..c9e58e59 100644 Binary files a/deps/darwin_amd64/libduckdb.a and b/deps/darwin_amd64/libduckdb.a differ diff --git a/deps/darwin_arm64/libduckdb.a b/deps/darwin_arm64/libduckdb.a index a13c7f6c..30bc7d0a 100644 Binary files a/deps/darwin_arm64/libduckdb.a and b/deps/darwin_arm64/libduckdb.a differ diff --git a/deps/freebsd_amd64/libduckdb.a b/deps/freebsd_amd64/libduckdb.a index 05b5f304..c3aa5385 100644 Binary files a/deps/freebsd_amd64/libduckdb.a and b/deps/freebsd_amd64/libduckdb.a differ diff --git a/deps/linux_amd64/libduckdb.a b/deps/linux_amd64/libduckdb.a index 67279617..ef25e97a 100644 Binary files a/deps/linux_amd64/libduckdb.a and b/deps/linux_amd64/libduckdb.a differ diff --git a/deps/linux_arm64/libduckdb.a b/deps/linux_arm64/libduckdb.a index ab003deb..5389f64e 100644 Binary files a/deps/linux_arm64/libduckdb.a and b/deps/linux_arm64/libduckdb.a differ diff --git a/duckdb.h b/duckdb.h index 45606c8a..2a7d2420 100644 --- a/duckdb.h +++ b/duckdb.h @@ -934,7 +934,8 @@ converted. The result must be freed with `duckdb_free`. DUCKDB_API char *duckdb_value_varchar(duckdb_result *result, idx_t col, idx_t row); /*! - * returns: The string value at the specified location. + * returns: The string value at the specified location. Attempts to cast the result value to string. + * No support for nested types, and for other complex types. * The resulting field "string.data" must be freed with `duckdb_free.` */ DUCKDB_API duckdb_string duckdb_value_string(duckdb_result *result, idx_t col, idx_t row); @@ -2578,11 +2579,10 @@ The error message should not be freed. It will be de-allocated when `duckdb_appe DUCKDB_API const char *duckdb_appender_error(duckdb_appender appender); /*! -Flush the appender to the table, forcing the cache of the appender to be cleared and the data to be appended to the -base table. - -This should generally not be used unless you know what you are doing. Instead, call `duckdb_appender_destroy` when you -are done with the appender. +Flush the appender to the table, forcing the cache of the appender to be cleared. If flushing the data triggers a +constraint violation or any other error, then all data is invalidated, and this function returns DuckDBError. +It is not possible to append more values. Call duckdb_appender_error to obtain the error message followed by +duckdb_appender_destroy to destroy the invalidated appender. * appender: The appender to flush. * returns: `DuckDBSuccess` on success or `DuckDBError` on failure. @@ -2590,9 +2590,10 @@ are done with the appender. DUCKDB_API duckdb_state duckdb_appender_flush(duckdb_appender appender); /*! -Close the appender, flushing all intermediate state in the appender to the table and closing it for further appends. - -This is generally not necessary. Call `duckdb_appender_destroy` instead. +Closes the appender by flushing all intermediate states and closing it for further appends. If flushing the data +triggers a constraint violation or any other error, then all data is invalidated, and this function returns DuckDBError. +Call duckdb_appender_error to obtain the error message followed by duckdb_appender_destroy to destroy the invalidated +appender. * appender: The appender to flush and close. * returns: `DuckDBSuccess` on success or `DuckDBError` on failure. @@ -2600,8 +2601,11 @@ This is generally not necessary. Call `duckdb_appender_destroy` instead. DUCKDB_API duckdb_state duckdb_appender_close(duckdb_appender appender); /*! -Close the appender and destroy it. Flushing all intermediate state in the appender to the table, and de-allocating -all memory associated with the appender. +Closes the appender by flushing all intermediate states to the table and destroying it. By destroying it, this function +de-allocates all memory associated with the appender. If flushing the data triggers a constraint violation, +then all data is invalidated, and this function returns DuckDBError. Due to the destruction of the appender, it is no +longer possible to obtain the specific error message with duckdb_appender_error. Therefore, call duckdb_appender_close +before destroying the appender, if you need insights into the specific error. * appender: The appender to flush, close and destroy. * returns: `DuckDBSuccess` on success or `DuckDBError` on failure.