Expand description
Vendored DuckDB C API bindings for the better-duck workspace.
This crate replaces the external libduckdb-sys dependency: DuckDB’s C++
source is vendored directly in this crate (vendor/duckdb.tar.gz,
compiled from source by build.rs on every build — there is no toggle for
this, unlike upstream’s bundled feature, since this crate exists
specifically to own that source), and the FFI bindings
are pregenerated and checked in rather than produced by
bindgen at consumer build time. See xtask/src/main.rs (workspace
root) for the maintainer-only regeneration process.
Structs§
- Arrow
Array - ! Forward declare Arrow structs ! It is important to notice that these structs are not defined by DuckDB but are actually Arrow external objects. ! They’re defined by the C Data Interface Arrow spec: https://arrow.apache.org/docs/format/CDataInterface.html
- Arrow
Schema - Error
- Wraps a raw DuckDB C API result code (
duckdb_state) as a Rust error. - _duckdb_
aggregate_ function - ! An aggregate function. Must be destroyed with
duckdb_destroy_aggregate_function. - _duckdb_
aggregate_ function_ set - ! A aggregate function set. Must be destroyed with
duckdb_destroy_aggregate_function_set. - _duckdb_
aggregate_ state - ! The state of an aggregate function.
- _duckdb_
appender - ! The appender enables fast data loading into DuckDB.
! Must be destroyed with
duckdb_appender_destroy. - _duckdb_
arrow - ! Holds an arrow query result. Must be destroyed with
duckdb_destroy_arrow. - _duckdb_
arrow_ array - ! Holds an arrow array. Remember to release the respective ArrowSchema object.
- _duckdb_
arrow_ converted_ schema - ! Holds an arrow converted schema (i.e., duckdb::ArrowTableSchema).
! In practice, this object holds the information necessary to do proper conversion between Arrow Types and DuckDB
! Types. Check duckdb/function/table/arrow/arrow_duck_schema.hpp for more details! Must be destroyed with
!
duckdb_destroy_arrow_converted_schema - _duckdb_
arrow_ options - ! The arrow options used when transforming the DuckDB schema and datachunks into Arrow schema and arrays.
! Used in
duckdb_to_arrow_schemaandduckdb_data_chunk_to_arrow - _duckdb_
arrow_ schema - ! Holds an arrow schema. Remember to release the respective ArrowSchema object.
- _duckdb_
arrow_ stream - ! Holds an arrow array stream. Must be destroyed with
duckdb_destroy_arrow_stream. - _duckdb_
bind_ info - ! The bind info of a function. ! When setting this info, it is necessary to pass a destroy-callback function.
- _duckdb_
cast_ function - ! A cast function. Must be destroyed with
duckdb_destroy_cast_function. - _duckdb_
catalog - ! A handle to a database catalog.
! Must be destroyed with
duckdb_destroy_catalog. - _duckdb_
catalog_ entry - ! A handle to a catalog entry (e.g., table, view, index, etc.).
! Must be destroyed with
duckdb_destroy_catalog_entry. - _duckdb_
client_ context - ! A client context of a duckdb connection. Must be destroyed with
duckdb_destroy_context. - _duckdb_
config - ! The configuration can be used to provide start-up options for a database.
! Must be destroyed with
duckdb_destroy_config. - _duckdb_
config_ option - ! A custom configuration option instance. Used to register custom options that can be set on a duckdb_config.
! or by the user in SQL using
SET <option_name> = <value>. - _duckdb_
connection - ! A connection to a duckdb database. Must be closed with
duckdb_disconnect. - _duckdb_
copy_ function - ! A COPY function. Must be destroyed with
duckdb_destroy_copy_function. - _duckdb_
copy_ function_ bind_ info - ! Info for the bind function of a COPY function.
- _duckdb_
copy_ function_ finalize_ info - ! Info for the finalize function of a COPY function.
- _duckdb_
copy_ function_ global_ init_ info - ! Info for the global initialization function of a COPY function.
- _duckdb_
copy_ function_ sink_ info - ! Info for the sink function of a COPY function.
- _duckdb_
create_ type_ info - ! Holds extra information to register a custom logical type. ! Reserved for future use.
- _duckdb_
data_ chunk - ! Contains a data chunk of a duckdb_result.
! Must be destroyed with
duckdb_destroy_data_chunk. - _duckdb_
database - ! A database object. Must be closed with
duckdb_close. - _duckdb_
error_ data - ! Holds error data.
! Must be destroyed with
duckdb_destroy_error_data. - _duckdb_
expression - ! Holds a bound expression.
! Must be destroyed with
duckdb_destroy_expression. - _duckdb_
extension_ info - ! Holds the state of the C API extension initialization process.
- _duckdb_
extracted_ statements - ! Extracted statements. Must be destroyed with
duckdb_destroy_extracted. - _duckdb_
file_ handle - _duckdb_
file_ open_ options - _duckdb_
file_ system - _duckdb_
function_ info - ! Additional function info. ! When setting this info, it is necessary to pass a destroy-callback function.
- _duckdb_
init_ info - ! Additional function initialization info. ! When setting this info, it is necessary to pass a destroy-callback function.
- _duckdb_
instance_ cache - ! A database instance cache object. Must be destroyed with
duckdb_destroy_instance_cache. - _duckdb_
log_ storage - ! Holds a log storage object.
- _duckdb_
logical_ type - ! A logical type.
! Must be destroyed with
duckdb_destroy_logical_type. - _duckdb_
pending_ result - ! The pending result represents an intermediate structure for a query that is not yet fully executed.
! Must be destroyed with
duckdb_destroy_pending. - _duckdb_
prepared_ statement - ! A prepared statement is a parameterized query that allows you to bind parameters to it.
! Must be destroyed with
duckdb_destroy_prepare. - _duckdb_
profiling_ info - ! Holds a recursive tree containing profiling metrics. ! The tree matches the query plan, and has a top-level node.
- _duckdb_
replacement_ scan_ info - ! Additional replacement scan info. When setting this info, it is necessary to pass a destroy-callback function.
- _duckdb_
scalar_ function - ! A scalar function. Must be destroyed with
duckdb_destroy_scalar_function. - _duckdb_
scalar_ function_ set - ! A scalar function set. Must be destroyed with
duckdb_destroy_scalar_function_set. - _duckdb_
selection_ vector - ! A selection vector is a vector of indices, which usually refer to values in a vector. ! Can be used to slice vectors, changing their length and the order of their entries. ! Standalone selection vectors must be destroyed.
- _duckdb_
table_ description - ! The table description allows querying information about the table.
! Must be destroyed with
duckdb_table_description_destroy. - _duckdb_
table_ function - ! A table function. Must be destroyed with
duckdb_destroy_table_function. - _duckdb_
value - ! A value of a logical type.
! Must be destroyed with
duckdb_destroy_value. - _duckdb_
vector - ! 1. A standalone vector that must be destroyed, or ! 2. A vector to a column in a data chunk that lives as long as the data chunk lives.
- duckdb_
bignum - ! BIGNUMs are composed of a byte pointer, a size, and an
is_negativebool. ! The absolute value of the number is stored indatain big endian format. ! You must freedatawithduckdb_free. - duckdb_
bit - ! BITs are composed of a byte pointer and a size.
! BIT byte data has 0 to 7 bits of padding.
! The first byte contains the number of padding bits.
! The padding bits of the second byte are set to 1, starting from the MSB.
! You must free
datawithduckdb_free. - duckdb_
blob - ! BLOBs are composed of a byte pointer and a size.
! You must free
blob.datawithduckdb_free. - duckdb_
column - ! A column consists of a pointer to its internal data. Don’t operate on this type directly.
! Instead, use functions such as
duckdb_column_data,duckdb_nullmask_data, !duckdb_column_type, andduckdb_column_name. - duckdb_
date - ! DATE is stored as days since 1970-01-01.
! Use the
duckdb_from_dateandduckdb_to_datefunctions to extract individual information. - duckdb_
date_ struct - duckdb_
decimal - ! DECIMAL is composed of a width and a scale. ! Their value is stored in a HUGEINT.
- duckdb_
extension_ access - ! Passed to C API extension as a parameter to the entrypoint.
- duckdb_
hugeint - ! HUGEINT is composed of a lower and upper component.
! Its value is upper * 2^64 + lower.
! For simplified usage, use
duckdb_hugeint_to_doubleandduckdb_double_to_hugeint. - duckdb_
interval - ! INTERVAL is stored in months, days, and micros.
- duckdb_
list_ entry - ! DuckDB’s LISTs are composed of a ‘parent’ vector holding metadata of each list,
! and a child vector holding the entries of the lists.
! The
duckdb_list_entrystruct contains the internal representation of a LIST metadata entry. ! A metadata entry contains the length of the list, and its offset in the child vector. - duckdb_
query_ progress_ type - ! A type holding information about the query execution progress.
- duckdb_
result - ! A query result consists of a pointer to its internal data. ! Must be freed with ‘duckdb_destroy_result’.
- duckdb_
string - ! Strings are composed of a
charpointer and a size. ! You must freestring.datawithduckdb_free. - duckdb_
string_ t - ! The internal representation of a VARCHAR (string_t). If the VARCHAR does not ! exceed 12 characters, then we inline it. Otherwise, we inline a four-byte prefix for faster ! string comparisons and store a pointer to the remaining characters. This is a non- ! owning structure, i.e., it does not have to be freed.
- duckdb_
string_ t__ bindgen_ ty_ 1__ bindgen_ ty_ 1 - duckdb_
string_ t__ bindgen_ ty_ 1__ bindgen_ ty_ 2 - duckdb_
time - ! TIME is stored as microseconds since 00:00:00.
! Use the
duckdb_from_timeandduckdb_to_timefunctions to extract individual information. - duckdb_
time_ ns - ! TIME_NS is stored as nanoseconds since 00:00:00.
- duckdb_
time_ struct - duckdb_
time_ tz - ! TIME_TZ is stored as 40 bits for the int64_t microseconds, and 24 bits for the int32_t offset.
! Use the
duckdb_from_time_tzfunction to extract individual information. - duckdb_
time_ tz_ struct - duckdb_
timestamp - ! TIMESTAMP is stored as microseconds since 1970-01-01.
! Use the
duckdb_from_timestampandduckdb_to_timestampfunctions to extract individual information. - duckdb_
timestamp_ ms - ! TIMESTAMP_MS is stored as milliseconds since 1970-01-01.
- duckdb_
timestamp_ ns - ! TIMESTAMP_NS is stored as nanoseconds since 1970-01-01.
- duckdb_
timestamp_ s - ! TIMESTAMP_S is stored as seconds since 1970-01-01.
- duckdb_
timestamp_ struct - duckdb_
uhugeint - ! UHUGEINT is composed of a lower and upper component.
! Its value is upper * 2^64 + lower.
! For simplified usage, use
duckdb_uhugeint_to_doubleandduckdb_double_to_uhugeint.
Constants§
- DUCKDB_
TYPE_ DUCKDB_ TYPE_ ANY - DUCKDB_
TYPE_ DUCKDB_ TYPE_ ARRAY - DUCKDB_
TYPE_ DUCKDB_ TYPE_ BIGINT - DUCKDB_
TYPE_ DUCKDB_ TYPE_ BIGNUM - DUCKDB_
TYPE_ DUCKDB_ TYPE_ BIT - DUCKDB_
TYPE_ DUCKDB_ TYPE_ BLOB - DUCKDB_
TYPE_ DUCKDB_ TYPE_ BOOLEAN - DUCKDB_
TYPE_ DUCKDB_ TYPE_ DATE - DUCKDB_
TYPE_ DUCKDB_ TYPE_ DECIMAL - DUCKDB_
TYPE_ DUCKDB_ TYPE_ DOUBLE - DUCKDB_
TYPE_ DUCKDB_ TYPE_ ENUM - DUCKDB_
TYPE_ DUCKDB_ TYPE_ FLOAT - DUCKDB_
TYPE_ DUCKDB_ TYPE_ GEOMETRY - DUCKDB_
TYPE_ DUCKDB_ TYPE_ HUGEINT - DUCKDB_
TYPE_ DUCKDB_ TYPE_ INTEGER - DUCKDB_
TYPE_ DUCKDB_ TYPE_ INTEGER_ LITERAL - DUCKDB_
TYPE_ DUCKDB_ TYPE_ INTERVAL - DUCKDB_
TYPE_ DUCKDB_ TYPE_ INVALID - DUCKDB_
TYPE_ DUCKDB_ TYPE_ LIST - DUCKDB_
TYPE_ DUCKDB_ TYPE_ MAP - DUCKDB_
TYPE_ DUCKDB_ TYPE_ SMALLINT - DUCKDB_
TYPE_ DUCKDB_ TYPE_ SQLNULL - DUCKDB_
TYPE_ DUCKDB_ TYPE_ STRING_ LITERAL - DUCKDB_
TYPE_ DUCKDB_ TYPE_ STRUCT - DUCKDB_
TYPE_ DUCKDB_ TYPE_ TIME - DUCKDB_
TYPE_ DUCKDB_ TYPE_ TIMESTAMP - DUCKDB_
TYPE_ DUCKDB_ TYPE_ TIMESTAMP_ MS - DUCKDB_
TYPE_ DUCKDB_ TYPE_ TIMESTAMP_ NS - DUCKDB_
TYPE_ DUCKDB_ TYPE_ TIMESTAMP_ S - DUCKDB_
TYPE_ DUCKDB_ TYPE_ TIMESTAMP_ TZ - DUCKDB_
TYPE_ DUCKDB_ TYPE_ TIME_ NS - DUCKDB_
TYPE_ DUCKDB_ TYPE_ TIME_ TZ - DUCKDB_
TYPE_ DUCKDB_ TYPE_ TINYINT - DUCKDB_
TYPE_ DUCKDB_ TYPE_ UBIGINT - DUCKDB_
TYPE_ DUCKDB_ TYPE_ UHUGEINT - DUCKDB_
TYPE_ DUCKDB_ TYPE_ UINTEGER - DUCKDB_
TYPE_ DUCKDB_ TYPE_ UNION - DUCKDB_
TYPE_ DUCKDB_ TYPE_ USMALLINT - DUCKDB_
TYPE_ DUCKDB_ TYPE_ UTINYINT - DUCKDB_
TYPE_ DUCKDB_ TYPE_ UUID - DUCKDB_
TYPE_ DUCKDB_ TYPE_ VARCHAR - DUCKDB_
TYPE_ DUCKDB_ TYPE_ VARIANT - DUCKDB_
VENDORED_ VERSION - The upstream DuckDB release tag this crate’s vendored source and bindings
were generated from (e.g.
"v1.5.5"), set bybuild.rsfrom the vendored archive’s ownmanifest.json. - DuckDB
Error - Friendlier alias for the raw
duckdb_state_DuckDBErrorconstant. - DuckDB
Success - Friendlier alias for the raw
duckdb_state_DuckDBSuccessconstant. - duckdb_
cast_ mode_ DUCKDB_ CAST_ NORMAL - duckdb_
cast_ mode_ DUCKDB_ CAST_ TRY - duckdb_
catalog_ entry_ type_ DUCKDB_ CATALOG_ ENTRY_ TYPE_ COLLATION - duckdb_
catalog_ entry_ type_ DUCKDB_ CATALOG_ ENTRY_ TYPE_ DATABASE - duckdb_
catalog_ entry_ type_ DUCKDB_ CATALOG_ ENTRY_ TYPE_ INDEX - duckdb_
catalog_ entry_ type_ DUCKDB_ CATALOG_ ENTRY_ TYPE_ INVALID - duckdb_
catalog_ entry_ type_ DUCKDB_ CATALOG_ ENTRY_ TYPE_ PREPARED_ STATEMENT - duckdb_
catalog_ entry_ type_ DUCKDB_ CATALOG_ ENTRY_ TYPE_ SCHEMA - duckdb_
catalog_ entry_ type_ DUCKDB_ CATALOG_ ENTRY_ TYPE_ SEQUENCE - duckdb_
catalog_ entry_ type_ DUCKDB_ CATALOG_ ENTRY_ TYPE_ TABLE - duckdb_
catalog_ entry_ type_ DUCKDB_ CATALOG_ ENTRY_ TYPE_ TYPE - duckdb_
catalog_ entry_ type_ DUCKDB_ CATALOG_ ENTRY_ TYPE_ VIEW - duckdb_
config_ option_ scope_ DUCKDB_ CONFIG_ OPTION_ SCOPE_ GLOBAL - duckdb_
config_ option_ scope_ DUCKDB_ CONFIG_ OPTION_ SCOPE_ INVALID - duckdb_
config_ option_ scope_ DUCKDB_ CONFIG_ OPTION_ SCOPE_ LOCAL - duckdb_
config_ option_ scope_ DUCKDB_ CONFIG_ OPTION_ SCOPE_ SESSION - duckdb_
error_ type_ DUCKDB_ ERROR_ AUTOLOAD - duckdb_
error_ type_ DUCKDB_ ERROR_ BINDER - duckdb_
error_ type_ DUCKDB_ ERROR_ CATALOG - duckdb_
error_ type_ DUCKDB_ ERROR_ CONNECTION - duckdb_
error_ type_ DUCKDB_ ERROR_ CONSTRAINT - duckdb_
error_ type_ DUCKDB_ ERROR_ CONVERSION - duckdb_
error_ type_ DUCKDB_ ERROR_ DECIMAL - duckdb_
error_ type_ DUCKDB_ ERROR_ DEPENDENCY - duckdb_
error_ type_ DUCKDB_ ERROR_ DIVIDE_ BY_ ZERO - duckdb_
error_ type_ DUCKDB_ ERROR_ EXECUTOR - duckdb_
error_ type_ DUCKDB_ ERROR_ EXPRESSION - duckdb_
error_ type_ DUCKDB_ ERROR_ FATAL - duckdb_
error_ type_ DUCKDB_ ERROR_ HTTP - duckdb_
error_ type_ DUCKDB_ ERROR_ INDEX - duckdb_
error_ type_ DUCKDB_ ERROR_ INTERNAL - duckdb_
error_ type_ DUCKDB_ ERROR_ INTERRUPT - duckdb_
error_ type_ DUCKDB_ ERROR_ INVALID - duckdb_
error_ type_ DUCKDB_ ERROR_ INVALID_ INPUT - duckdb_
error_ type_ DUCKDB_ ERROR_ INVALID_ TYPE - duckdb_
error_ type_ DUCKDB_ ERROR_ IO - duckdb_
error_ type_ DUCKDB_ ERROR_ MISMATCH_ TYPE - duckdb_
error_ type_ DUCKDB_ ERROR_ MISSING_ EXTENSION - duckdb_
error_ type_ DUCKDB_ ERROR_ NETWORK - duckdb_
error_ type_ DUCKDB_ ERROR_ NOT_ IMPLEMENTED - duckdb_
error_ type_ DUCKDB_ ERROR_ NULL_ POINTER - duckdb_
error_ type_ DUCKDB_ ERROR_ OBJECT_ SIZE - duckdb_
error_ type_ DUCKDB_ ERROR_ OPTIMIZER - duckdb_
error_ type_ DUCKDB_ ERROR_ OUT_ OF_ MEMORY - duckdb_
error_ type_ DUCKDB_ ERROR_ OUT_ OF_ RANGE - duckdb_
error_ type_ DUCKDB_ ERROR_ PARAMETER_ NOT_ ALLOWED - duckdb_
error_ type_ DUCKDB_ ERROR_ PARAMETER_ NOT_ RESOLVED - duckdb_
error_ type_ DUCKDB_ ERROR_ PARSER - duckdb_
error_ type_ DUCKDB_ ERROR_ PERMISSION - duckdb_
error_ type_ DUCKDB_ ERROR_ PLANNER - duckdb_
error_ type_ DUCKDB_ ERROR_ SCHEDULER - duckdb_
error_ type_ DUCKDB_ ERROR_ SEQUENCE - duckdb_
error_ type_ DUCKDB_ ERROR_ SERIALIZATION - duckdb_
error_ type_ DUCKDB_ ERROR_ SETTINGS - duckdb_
error_ type_ DUCKDB_ ERROR_ STAT - duckdb_
error_ type_ DUCKDB_ ERROR_ SYNTAX - duckdb_
error_ type_ DUCKDB_ ERROR_ TRANSACTION - duckdb_
error_ type_ DUCKDB_ ERROR_ UNKNOWN_ TYPE - duckdb_
error_ type_ DUCKDB_ INVALID_ CONFIGURATION - duckdb_
file_ flag_ DUCKDB_ FILE_ FLAG_ APPEND - duckdb_
file_ flag_ DUCKDB_ FILE_ FLAG_ CREATE - duckdb_
file_ flag_ DUCKDB_ FILE_ FLAG_ CREATE_ NEW - duckdb_
file_ flag_ DUCKDB_ FILE_ FLAG_ INVALID - duckdb_
file_ flag_ DUCKDB_ FILE_ FLAG_ READ - duckdb_
file_ flag_ DUCKDB_ FILE_ FLAG_ WRITE - duckdb_
pending_ state_ DUCKDB_ PENDING_ ERROR - duckdb_
pending_ state_ DUCKDB_ PENDING_ NO_ TASKS_ AVAILABLE - duckdb_
pending_ state_ DUCKDB_ PENDING_ RESULT_ NOT_ READY - duckdb_
pending_ state_ DUCKDB_ PENDING_ RESULT_ READY - duckdb_
result_ type_ DUCKDB_ RESULT_ TYPE_ CHANGED_ ROWS - duckdb_
result_ type_ DUCKDB_ RESULT_ TYPE_ INVALID - duckdb_
result_ type_ DUCKDB_ RESULT_ TYPE_ NOTHING - duckdb_
result_ type_ DUCKDB_ RESULT_ TYPE_ QUERY_ RESULT - duckdb_
state_ DuckDB Error - duckdb_
state_ DuckDB Success - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ ALTER - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ ANALYZE - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ ATTACH - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ CALL - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ COPY - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ COPY_ DATABASE - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ CREATE - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ CREATE_ FUNC - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ DELETE - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ DETACH - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ DROP - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ EXECUTE - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ EXPLAIN - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ EXPORT - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ EXTENSION - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ INSERT - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ INVALID - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ LOAD - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ LOGICAL_ PLAN - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ MERGE_ INTO - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ MULTI - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ PRAGMA - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ PREPARE - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ RELATION - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ SELECT - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ SET - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ TRANSACTION - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ UPDATE - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ UPDATE_ EXTENSIONS - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ VACUUM - duckdb_
statement_ type_ DUCKDB_ STATEMENT_ TYPE_ VARIABLE_ SET
Functions§
- duckdb_
add_ ⚠aggregate_ function_ to_ set - Adds the aggregate function as a new overload to the aggregate function set.
- duckdb_
add_ ⚠replacement_ scan - Add a replacement scan definition to the specified database.
- duckdb_
add_ ⚠scalar_ function_ to_ set - Adds the scalar function as a new overload to the scalar function set.
- duckdb_
aggregate_ ⚠function_ add_ parameter - Adds a parameter to the aggregate function.
- duckdb_
aggregate_ ⚠function_ get_ extra_ info - Retrieves the extra info of the function as set in
duckdb_aggregate_function_set_extra_info. - duckdb_
aggregate_ ⚠function_ set_ destructor - Sets the state destructor callback of the aggregate function (optional)
- duckdb_
aggregate_ ⚠function_ set_ error - Report that an error has occurred while executing the aggregate function.
- duckdb_
aggregate_ ⚠function_ set_ extra_ info - Assigns extra information to the scalar function that can be fetched during binding, etc.
- duckdb_
aggregate_ ⚠function_ set_ functions - Sets the main functions of the aggregate function.
- duckdb_
aggregate_ ⚠function_ set_ name - Sets the name of the given aggregate function.
- duckdb_
aggregate_ ⚠function_ set_ return_ type - Sets the return type of the aggregate function.
- duckdb_
aggregate_ ⚠function_ set_ special_ handling - Sets the NULL handling of the aggregate function to SPECIAL_HANDLING.
- duckdb_
append_ ⚠blob - Append a blob value to the appender.
- duckdb_
append_ ⚠bool - Append a bool value to the appender.
- duckdb_
append_ ⚠data_ chunk - Appends a pre-filled data chunk to the specified appender. Attempts casting, if the data chunk types do not match the active appender types.
- duckdb_
append_ ⚠date - Append a duckdb_date value to the appender.
- duckdb_
append_ ⚠default - Append a DEFAULT value (NULL if DEFAULT not available for column) to the appender.
- duckdb_
append_ ⚠default_ to_ chunk - Append a DEFAULT value, at the specified row and column, (NULL if DEFAULT not available for column) to the chunk created from the specified appender. The default value of the column must be a constant value. Non-deterministic expressions like nextval(‘seq’) or random() are not supported.
- duckdb_
append_ ⚠double - Append a double value to the appender.
- duckdb_
append_ ⚠float - Append a float value to the appender.
- duckdb_
append_ ⚠hugeint - Append a duckdb_hugeint value to the appender.
- duckdb_
append_ ⚠int8 - Append an int8_t value to the appender.
- duckdb_
append_ ⚠int16 - Append an int16_t value to the appender.
- duckdb_
append_ ⚠int32 - Append an int32_t value to the appender.
- duckdb_
append_ ⚠int64 - Append an int64_t value to the appender.
- duckdb_
append_ ⚠interval - Append a duckdb_interval value to the appender.
- duckdb_
append_ ⚠null - Append a NULL value to the appender (of any type).
- duckdb_
append_ ⚠time - Append a duckdb_time value to the appender.
- duckdb_
append_ ⚠timestamp - Append a duckdb_timestamp value to the appender.
- duckdb_
append_ ⚠uhugeint - Append a duckdb_uhugeint value to the appender.
- duckdb_
append_ ⚠uint8 - Append a uint8_t value to the appender.
- duckdb_
append_ ⚠uint16 - Append a uint16_t value to the appender.
- duckdb_
append_ ⚠uint32 - Append a uint32_t value to the appender.
- duckdb_
append_ ⚠uint64 - Append a uint64_t value to the appender.
- duckdb_
append_ ⚠value - Append a duckdb_value to the appender.
- duckdb_
append_ ⚠varchar - Append a varchar value to the appender.
- duckdb_
append_ ⚠varchar_ length - Append a varchar value to the appender.
- duckdb_
appender_ ⚠add_ column - Appends a column to the active column list of the appender. Immediately flushes all previous data.
- duckdb_
appender_ ⚠begin_ row - A nop function, provided for backwards compatibility reasons. Does nothing. Only
duckdb_appender_end_rowis required. - duckdb_
appender_ ⚠clear - Clears all buffered data from the appender without flushing it to the table. This discards any data that has been appended but not yet written. The appender can continue to be used after clearing.
- duckdb_
appender_ ⚠clear_ columns - Removes all columns from the active column list of the appender, resetting the appender to treat all columns as active. Immediately flushes all previous data.
- duckdb_
appender_ ⚠close - 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_data to obtain the error data followed by duckdb_appender_destroy to destroy the invalidated appender.
- duckdb_
appender_ ⚠column_ count - Returns the number of columns that belong to the appender. If there is no active column list, then this equals the table’s physical columns.
- duckdb_
appender_ ⚠column_ type - Returns the type of the column at the specified index. This is either a type in the active column list, or the same type as a column in the receiving table.
- duckdb_
appender_ ⚠create - Creates an appender object.
- duckdb_
appender_ ⚠create_ ext - Creates an appender object.
- duckdb_
appender_ ⚠create_ query - Creates an appender object that executes the given query with any data appended to it.
- duckdb_
appender_ ⚠destroy - 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.
- duckdb_
appender_ ⚠end_ row - Finish the current row of appends. After end_row is called, the next row can be appended.
- duckdb_
appender_ ⚠error - DEPRECATION NOTICE**: This method is scheduled for removal in a future release. Use duckdb_appender_error_data instead.
- duckdb_
appender_ ⚠error_ data - Returns the error data associated with the appender. Must be destroyed with duckdb_destroy_error_data.
- duckdb_
appender_ ⚠flush - 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_data to obtain the error data followed by duckdb_appender_destroy to destroy the invalidated appender.
- duckdb_
array_ ⚠type_ array_ size - Retrieves the array size of the given array type.
- duckdb_
array_ ⚠type_ child_ type - Retrieves the child type of the given ARRAY type.
- duckdb_
array_ ⚠vector_ get_ child - Retrieves the child vector of an array vector. The resulting vector is valid as long as the parent vector is valid. The resulting vector has the size of the parent vector multiplied by the array size.
- duckdb_
arrow_ ⚠array_ scan - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
arrow_ ⚠column_ count - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
arrow_ ⚠row_ count - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
arrow_ ⚠rows_ changed - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
arrow_ ⚠scan - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
bind_ ⚠add_ result_ column - Adds a result column to the output of the table function.
- duckdb_
bind_ ⚠blob - Binds a blob value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠boolean - Binds a bool value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠date - Binds a duckdb_date value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠decimal - Binds a duckdb_decimal value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠double - Binds a double value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠float - Binds a float value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠get_ extra_ info - Retrieves the extra info of the function as set in
duckdb_table_function_set_extra_info. - duckdb_
bind_ ⚠get_ named_ parameter - Retrieves a named parameter with the given name.
- duckdb_
bind_ ⚠get_ parameter - Retrieves the parameter at the given index.
- duckdb_
bind_ ⚠get_ parameter_ count - Retrieves the number of regular (non-named) parameters to the function.
- duckdb_
bind_ ⚠hugeint - Binds a duckdb_hugeint value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠int8 - Binds an int8_t value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠int16 - Binds an int16_t value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠int32 - Binds an int32_t value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠int64 - Binds an int64_t value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠interval - Binds a duckdb_interval value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠null - Binds a NULL value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠parameter_ index - Retrieve the index of the parameter for the prepared statement, identified by name
- duckdb_
bind_ ⚠set_ bind_ data - Sets the user-provided bind data in the bind object of the table function. This object can be retrieved again during execution.
- duckdb_
bind_ ⚠set_ cardinality - Sets the cardinality estimate for the table function, used for optimization.
- duckdb_
bind_ ⚠set_ error - Report that an error has occurred while calling bind on a table function.
- duckdb_
bind_ ⚠time - Binds a duckdb_time value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠timestamp - Binds a duckdb_timestamp value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠timestamp_ tz - Binds a duckdb_timestamp value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠uhugeint - Binds a duckdb_uhugeint value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠uint8 - Binds a uint8_t value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠uint16 - Binds a uint16_t value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠uint32 - Binds a uint32_t value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠uint64 - Binds a uint64_t value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠value - Binds a value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠varchar - Binds a null-terminated varchar value to the prepared statement at the specified index.
- duckdb_
bind_ ⚠varchar_ length - Binds a varchar value to the prepared statement at the specified index.
- duckdb_
cast_ ⚠function_ get_ cast_ mode - Get the cast execution mode from the given function info.
- duckdb_
cast_ ⚠function_ get_ extra_ info - Retrieves the extra info of the function as set in
duckdb_cast_function_set_extra_info. - duckdb_
cast_ ⚠function_ set_ error - Report that an error has occurred while executing the cast function.
- duckdb_
cast_ ⚠function_ set_ extra_ info - Assigns extra information to the cast function that can be fetched during execution, etc.
- duckdb_
cast_ ⚠function_ set_ function - Sets the actual cast function to use.
- duckdb_
cast_ ⚠function_ set_ implicit_ cast_ cost - Sets the “cost” of implicitly casting the source type to the target type using this function.
- duckdb_
cast_ ⚠function_ set_ row_ error - Report that an error has occurred while executing the cast function, setting the corresponding output row to NULL.
- duckdb_
cast_ ⚠function_ set_ source_ type - Sets the source type of the cast function.
- duckdb_
cast_ ⚠function_ set_ target_ type - Sets the target type of the cast function.
- duckdb_
catalog_ ⚠entry_ get_ name - Get the name of the given catalog entry.
- duckdb_
catalog_ ⚠entry_ get_ type - Get the type of the given catalog entry.
- duckdb_
catalog_ ⚠get_ entry - Retrieve a catalog entry from the given catalog by type, schema name and entry name. The returned catalog entry remains valid for the duration of the current transaction.
- duckdb_
catalog_ ⚠get_ type_ name - Retrieve the “type name” of the given catalog. E.g. for a DuckDB database, this returns ‘duckdb’. The returned string is owned by the catalog and remains valid until the catalog is destroyed.
- duckdb_
clear_ ⚠bindings - Clear the params bind to the prepared statement.
- duckdb_
client_ ⚠context_ get_ catalog - Retrieve a database catalog instance by name.
This function can only be called from within the context of an active transaction, e.g. during execution of a registered
function callback. Otherwise returns
nullptr. @param context The client context. @param catalog_name The name of the catalog. @return The resulting catalog instance, ornullptrif called from outside an active transaction or if a catalog with the specified name does not exist. Must be destroyed withduckdb_destroy_catalog - duckdb_
client_ ⚠context_ get_ config_ option - Retrieves the value of a configuration option by name from the given client context.
- duckdb_
client_ ⚠context_ get_ connection_ id - Returns the connection id of the client context.
- duckdb_
client_ ⚠context_ get_ file_ system - Get a file system instance associated with the given client context.
- duckdb_
close ⚠ - Closes the specified database and de-allocates all memory allocated for that database.
This should be called after you are done with any database allocated through
duckdb_openorduckdb_open_ext. Note that failing to callduckdb_close(in case of e.g. a program crash) will not cause data corruption. Still, it is recommended to always correctly close a database object after you are done with it. - duckdb_
column_ ⚠count - Returns the number of columns present in a the result object.
- duckdb_
column_ ⚠data - DEPRECATED**: Prefer using
duckdb_result_get_chunkinstead. - duckdb_
column_ ⚠has_ default - Check if the column at ‘index’ index of the table has a DEFAULT expression.
- duckdb_
column_ ⚠logical_ type - Returns the logical column type of the specified column.
- duckdb_
column_ ⚠name - Returns the column name of the specified column. The result should not need to be freed; the column names will automatically be destroyed when the result is destroyed.
- duckdb_
column_ ⚠type - Returns the column type of the specified column.
- duckdb_
config_ ⚠count - This returns the total amount of configuration options available for usage with
duckdb_get_config_flag. - duckdb_
config_ ⚠option_ set_ default_ scope - Sets the default scope of the configuration option.
If not set, this defaults to
DUCKDB_CONFIG_OPTION_SCOPE_SESSION. - duckdb_
config_ ⚠option_ set_ default_ value - Sets the default value of the configuration option.
If the type of this option has already been set with
duckdb_config_option_set_type, the value is cast to the type. Otherwise, the type is inferred from the value. - duckdb_
config_ ⚠option_ set_ description - Sets the description of the configuration option.
- duckdb_
config_ ⚠option_ set_ name - Sets the name of the configuration option.
- duckdb_
config_ ⚠option_ set_ type - Sets the type of the configuration option.
- duckdb_
connect ⚠ - Opens a connection to a database. Connections are required to query the database, and store transactional state associated with the connection. The instantiated connection should be closed using ‘duckdb_disconnect’.
- duckdb_
connection_ ⚠get_ arrow_ options - Retrieves the arrow options of the connection.
- duckdb_
connection_ ⚠get_ client_ context - Retrieves the client context of the connection.
- duckdb_
copy_ ⚠function_ bind_ get_ client_ context - Retrieves the client context of the current connection binding the
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ bind_ get_ column_ count - Retrieves the number of columns that will be provided to the
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ bind_ get_ column_ type - Retrieves the type of a column that will be provided to the
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ bind_ get_ extra_ info - Retrieves the extra info pointer of the copy function.
- duckdb_
copy_ ⚠function_ bind_ get_ options - Retrieves all values for the given options provided to the
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ bind_ set_ bind_ data - Sets the bind data of the copy function, to be provided to the init, sink and finalize functions.
- duckdb_
copy_ ⚠function_ bind_ set_ error - Report that an error occurred during the binding-phase of a
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ finalize_ get_ bind_ data - Retrieves the bind data provided during the binding-phase of a
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ finalize_ get_ client_ context - Retrieves the client context of the current connection during the finalize-phase of the
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ finalize_ get_ extra_ info - Retrieves the extra info pointer of the copy function.
- duckdb_
copy_ ⚠function_ finalize_ get_ global_ state - Retrieves the global state provided during the init-phase of a
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ finalize_ set_ error - Report that an error occurred during the finalize-phase of a
COPY ... TOfunction - duckdb_
copy_ ⚠function_ global_ init_ get_ bind_ data - Retrieves the bind data provided during the binding-phase of a
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ global_ init_ get_ client_ context - Retrieves the client context of the current connection initializing the
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ global_ init_ get_ extra_ info - Retrieves the extra info pointer of the copy function.
- duckdb_
copy_ ⚠function_ global_ init_ get_ file_ path - Retrieves the file path provided to the
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ global_ init_ set_ error - Report that an error occurred during the initialization-phase of a
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ global_ init_ set_ global_ state - Sets the global state of the copy function, to be provided to all subsequent local init, sink and finalize functions.
- duckdb_
copy_ ⚠function_ set_ bind - Sets the bind function of the copy function, to use when binding
COPY ... TO. - duckdb_
copy_ ⚠function_ set_ copy_ from_ function - Sets the table function to use when executing a
COPY ... FROM (...)statement with this copy function. - duckdb_
copy_ ⚠function_ set_ extra_ info - Sets the extra info pointer of the copy function, which can be used to store arbitrary data.
- duckdb_
copy_ ⚠function_ set_ finalize - Sets the finalize function of the copy function, called at the end of
COPY ... TO. - duckdb_
copy_ ⚠function_ set_ global_ init - Sets the initialization function of the copy function, called right before executing
COPY ... TO. - duckdb_
copy_ ⚠function_ set_ name - Sets the name of the copy function.
- duckdb_
copy_ ⚠function_ set_ sink - Sets the sink function of the copy function, called during
COPY ... TO. - duckdb_
copy_ ⚠function_ sink_ get_ bind_ data - Retrieves the bind data provided during the binding-phase of a
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ sink_ get_ client_ context - Retrieves the client context of the current connection during the sink-phase of the
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ sink_ get_ extra_ info - Retrieves the extra info pointer of the copy function.
- duckdb_
copy_ ⚠function_ sink_ get_ global_ state - Retrieves the global state provided during the init-phase of a
COPY ... TOfunction. - duckdb_
copy_ ⚠function_ sink_ set_ error - Report that an error occurred during the sink-phase of a
COPY ... TOfunction. - duckdb_
create_ ⚠aggregate_ function - Creates a new empty aggregate function.
- duckdb_
create_ ⚠aggregate_ function_ set - Creates a new empty aggregate function set.
- duckdb_
create_ ⚠array_ type - Creates an ARRAY type from its child type.
The return type must be destroyed with
duckdb_destroy_logical_type. - duckdb_
create_ ⚠array_ value - Creates an array value from a child (element) type and an array of values of length
value_count. Must be destroyed withduckdb_destroy_value. - duckdb_
create_ ⚠bignum - Creates a BIGNUM value from a duckdb_bignum
- duckdb_
create_ ⚠bit - Creates a BIT value from a duckdb_bit
- duckdb_
create_ ⚠blob - Creates a value from a blob
- duckdb_
create_ ⚠bool - Creates a value from a boolean
- duckdb_
create_ ⚠cast_ function - Creates a new cast function object.
- duckdb_
create_ ⚠config - Initializes an empty configuration object that can be used to provide start-up options for the DuckDB instance
through
duckdb_open_ext. The duckdb_config must be destroyed using ‘duckdb_destroy_config’ - duckdb_
create_ ⚠config_ option - Creates a configuration option instance.
- duckdb_
create_ ⚠copy_ function - Creates a new empty copy function.
- duckdb_
create_ ⚠data_ chunk - Creates an empty data chunk with the specified column types.
The result must be destroyed with
duckdb_destroy_data_chunk. - duckdb_
create_ ⚠date - Creates a value from a date
- duckdb_
create_ ⚠decimal - Creates a DECIMAL value from a duckdb_decimal
- duckdb_
create_ ⚠decimal_ type - Creates a DECIMAL type with the specified width and scale.
The resulting type should be destroyed with
duckdb_destroy_logical_type. - duckdb_
create_ ⚠double - Creates a value from a double
- duckdb_
create_ ⚠enum_ type - Creates an ENUM type from the passed member name array.
The resulting type should be destroyed with
duckdb_destroy_logical_type. - duckdb_
create_ ⚠enum_ value - Creates an enum value from a type and a value. Must be destroyed with
duckdb_destroy_value. - duckdb_
create_ ⚠error_ data - Creates duckdb_error_data.
Must be destroyed with
duckdb_destroy_error_data. - duckdb_
create_ ⚠file_ open_ options - Creates a new file open options instance with blank settings.
- duckdb_
create_ ⚠float - Creates a value from a float
- duckdb_
create_ ⚠hugeint - Creates a value from a hugeint
- duckdb_
create_ ⚠instance_ cache - Creates a new database instance cache. The instance cache is necessary if a client/program (re)opens multiple databases to the same file within the same process. Must be destroyed with ‘duckdb_destroy_instance_cache’.
- duckdb_
create_ ⚠int8 - Creates a value from an int8_t (a tinyint)
- duckdb_
create_ ⚠int16 - Creates a value from an int16_t (a smallint)
- duckdb_
create_ ⚠int32 - Creates a value from an int32_t (an integer)
- duckdb_
create_ ⚠int64 - Creates a value from an int64
- duckdb_
create_ ⚠interval - Creates a value from an interval
- duckdb_
create_ ⚠list_ type - Creates a LIST type from its child type.
The return type must be destroyed with
duckdb_destroy_logical_type. - duckdb_
create_ ⚠list_ value - Creates a list value from a child (element) type and an array of values of length
value_count. Must be destroyed withduckdb_destroy_value. - duckdb_
create_ ⚠log_ storage - Creates a new log storage object.
- duckdb_
create_ ⚠logical_ type - Creates a
duckdb_logical_typefrom a primitive type. The resulting logical type must be destroyed withduckdb_destroy_logical_type. - duckdb_
create_ ⚠map_ type - Creates a MAP type from its key type and value type.
The return type must be destroyed with
duckdb_destroy_logical_type. - duckdb_
create_ ⚠map_ value - Creates a map value from a map type and two arrays, one for the keys and one for the values, each of length
entry_count. Must be destroyed withduckdb_destroy_value. - duckdb_
create_ ⚠null_ value - Creates a value of type SQLNULL.
- duckdb_
create_ ⚠scalar_ function - Creates a new empty scalar function.
- duckdb_
create_ ⚠scalar_ function_ set - Creates a new empty scalar function set.
- duckdb_
create_ ⚠selection_ vector - Creates a new selection vector of size
size. Must be destroyed withduckdb_destroy_selection_vector. - duckdb_
create_ ⚠struct_ type - Creates a STRUCT type based on the member types and names.
The resulting type must be destroyed with
duckdb_destroy_logical_type. - duckdb_
create_ ⚠struct_ value - Creates a struct value from a type and an array of values. Must be destroyed with
duckdb_destroy_value. - duckdb_
create_ ⚠table_ function - Creates a new empty table function.
- duckdb_
create_ ⚠task_ state - Creates a task state that can be used with duckdb_execute_tasks_state to execute tasks until
duckdb_finish_executionis called on the state. - duckdb_
create_ ⚠time - Creates a value from a time
- duckdb_
create_ ⚠time_ ns - Creates a value from a time_ns
- duckdb_
create_ ⚠time_ tz - Create a
duckdb_time_tzobject from micros and a timezone offset. - duckdb_
create_ ⚠time_ tz_ value - Creates a value from a time_tz.
Not to be confused with
duckdb_create_time_tz, which creates a duckdb_time_tz_t. - duckdb_
create_ ⚠timestamp - Creates a TIMESTAMP value from a duckdb_timestamp
- duckdb_
create_ ⚠timestamp_ ms - Creates a TIMESTAMP_MS value from a duckdb_timestamp_ms
- duckdb_
create_ ⚠timestamp_ ns - Creates a TIMESTAMP_NS value from a duckdb_timestamp_ns
- duckdb_
create_ ⚠timestamp_ s - Creates a TIMESTAMP_S value from a duckdb_timestamp_s
- duckdb_
create_ ⚠timestamp_ tz - Creates a TIMESTAMP_TZ value from a duckdb_timestamp
- duckdb_
create_ ⚠uhugeint - Creates a value from a uhugeint
- duckdb_
create_ ⚠uint8 - Creates a value from a uint8_t (a utinyint)
- duckdb_
create_ ⚠uint16 - Creates a value from a uint16_t (a usmallint)
- duckdb_
create_ ⚠uint32 - Creates a value from a uint32_t (a uinteger)
- duckdb_
create_ ⚠uint64 - Creates a value from a uint64_t (a ubigint)
- duckdb_
create_ ⚠union_ type - Creates a UNION type from the passed arrays.
The return type must be destroyed with
duckdb_destroy_logical_type. - duckdb_
create_ ⚠union_ value - Creates a union value from a union type, a tag index, and a value.
Must be destroyed with
duckdb_destroy_value. - duckdb_
create_ ⚠uuid - Creates a UUID value from a uhugeint
- duckdb_
create_ ⚠varchar - Creates a value from a null-terminated string. Returns nullptr if the string is not valid UTF-8 or other invalid input.
- duckdb_
create_ ⚠varchar_ length - Creates a value from a string. Returns nullptr if the string is not valid UTF-8 or other invalid input.
- duckdb_
create_ ⚠vector - Creates a flat vector. Must be destroyed with
duckdb_destroy_vector. - duckdb_
data_ ⚠chunk_ from_ arrow - Transforms an Arrow array into a DuckDB data chunk. The data chunk will retain ownership of the underlying Arrow data.
- duckdb_
data_ ⚠chunk_ get_ column_ count - Retrieves the number of columns in a data chunk.
- duckdb_
data_ ⚠chunk_ get_ size - Retrieves the current number of tuples in a data chunk.
- duckdb_
data_ ⚠chunk_ get_ vector - Retrieves the vector at the specified column index in the data chunk.
- duckdb_
data_ ⚠chunk_ reset - Resets a data chunk, clearing the validity masks and setting the cardinality of the data chunk to 0.
After calling this method, you must call
duckdb_vector_get_validityandduckdb_vector_get_datato obtain current data and validity pointers - duckdb_
data_ ⚠chunk_ set_ size - Sets the current number of tuples in a data chunk.
- duckdb_
data_ ⚠chunk_ to_ arrow - Transforms a DuckDB data chunk into an Arrow array.
- duckdb_
decimal_ ⚠internal_ type - Retrieves the internal storage type of a decimal type.
- duckdb_
decimal_ ⚠scale - Retrieves the scale of a decimal type.
- duckdb_
decimal_ ⚠to_ double - Converts a duckdb_decimal object (as obtained from a
DUCKDB_TYPE_DECIMALcolumn) into a double. - duckdb_
decimal_ ⚠width - Retrieves the width of a decimal type.
- duckdb_
destroy_ ⚠aggregate_ function - Destroys the given aggregate function object.
- duckdb_
destroy_ ⚠aggregate_ function_ set - Destroys the given aggregate function set object.
- duckdb_
destroy_ ⚠arrow - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
destroy_ ⚠arrow_ converted_ schema - Destroys the arrow converted schema and de-allocates all memory allocated for that arrow converted schema.
- duckdb_
destroy_ ⚠arrow_ options - Destroys the arrow options and deallocates its memory.
- duckdb_
destroy_ ⚠arrow_ stream - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
destroy_ ⚠cast_ function - Destroys the cast function object.
- duckdb_
destroy_ ⚠catalog - Destroys the given catalog instance.
- duckdb_
destroy_ ⚠catalog_ entry - Destroys the given catalog entry instance.
- duckdb_
destroy_ ⚠client_ context - Destroys the client context and deallocates its memory.
- duckdb_
destroy_ ⚠config - Destroys the specified configuration object and de-allocates all memory allocated for the object.
- duckdb_
destroy_ ⚠config_ option - Destroys the given configuration option instance. @param option The configuration option instance to destroy.
- duckdb_
destroy_ ⚠copy_ function - Destroys the given copy function object. @param copy_function The copy function to destroy.
- duckdb_
destroy_ ⚠data_ chunk - Destroys the data chunk and de-allocates all memory allocated for that chunk.
- duckdb_
destroy_ ⚠error_ data - Destroys the error data and deallocates its memory.
- duckdb_
destroy_ ⚠expression - Destroys the expression and de-allocates its memory.
- duckdb_
destroy_ ⚠extracted - De-allocates all memory allocated for the extracted statements. @param extracted_statements The extracted statements to destroy.
- duckdb_
destroy_ ⚠file_ handle - Destroys the given file handle and deallocates all associated resources. This will also close the file if it is still open.
- duckdb_
destroy_ ⚠file_ open_ options - Destroys the given file open options instance. @param options The file open options instance to destroy.
- duckdb_
destroy_ ⚠file_ system - Destroys the given file system instance. @param file_system The file system instance to destroy.
- duckdb_
destroy_ ⚠instance_ cache - Destroys an existing database instance cache and de-allocates its memory.
- duckdb_
destroy_ ⚠log_ storage - Destroys a log storage object.
- duckdb_
destroy_ ⚠logical_ type - Destroys the logical type and de-allocates all memory allocated for that type.
- duckdb_
destroy_ ⚠pending - Closes the pending result and de-allocates all memory allocated for the result.
- duckdb_
destroy_ ⚠prepare - Closes the prepared statement and de-allocates all memory allocated for the statement.
- duckdb_
destroy_ ⚠result - Closes the result and de-allocates all memory allocated for that result.
- duckdb_
destroy_ ⚠scalar_ function - Destroys the given scalar function object.
- duckdb_
destroy_ ⚠scalar_ function_ set - Destroys the given scalar function set object.
- duckdb_
destroy_ ⚠selection_ vector - Destroys the selection vector and de-allocates its memory.
- duckdb_
destroy_ ⚠table_ function - Destroys the given table function object.
- duckdb_
destroy_ ⚠task_ state - Destroys the task state returned from duckdb_create_task_state.
- duckdb_
destroy_ ⚠value - Destroys the value and de-allocates all memory allocated for that type.
- duckdb_
destroy_ ⚠vector - Destroys the vector and de-allocates its memory.
- duckdb_
disconnect ⚠ - Closes the specified connection and de-allocates all memory allocated for that connection.
- duckdb_
double_ ⚠to_ decimal - Converts a double value to a duckdb_decimal object.
- duckdb_
double_ ⚠to_ hugeint - Converts a double value to a duckdb_hugeint object.
- duckdb_
double_ ⚠to_ uhugeint - Converts a double value to a duckdb_uhugeint object.
- duckdb_
enum_ ⚠dictionary_ size - Retrieves the dictionary size of the enum type.
- duckdb_
enum_ ⚠dictionary_ value - Retrieves the dictionary value at the specified position from the enum.
- duckdb_
enum_ ⚠internal_ type - Retrieves the internal storage type of an enum type.
- duckdb_
error_ ⚠data_ error_ type - Returns the duckdb_error_type of the error data.
- duckdb_
error_ ⚠data_ has_ error - Returns whether the error data contains an error or not.
- duckdb_
error_ ⚠data_ message - Returns the error message of the error data. Must not be freed.
- duckdb_
execute_ ⚠n_ tasks_ state - Execute DuckDB tasks on this thread.
- duckdb_
execute_ ⚠pending - Fully execute a pending query result, returning the final query result.
- duckdb_
execute_ ⚠prepared - Executes the prepared statement with the given bound parameters, and returns a materialized query result.
- duckdb_
execute_ ⚠prepared_ arrow - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
execute_ ⚠prepared_ streaming - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
execute_ ⚠tasks - Execute DuckDB tasks on this thread.
- duckdb_
execute_ ⚠tasks_ state - Execute DuckDB tasks on this thread.
- duckdb_
execution_ ⚠is_ finished - Returns true if the execution of the current query is finished.
- duckdb_
expression_ ⚠fold - Folds an expression creating a folded value.
- duckdb_
expression_ ⚠is_ foldable - Returns whether the expression is foldable into a value or not.
- duckdb_
expression_ ⚠return_ type - Returns the return type of an expression.
- duckdb_
extract_ ⚠statements - Extract all statements from a query.
Note that after calling
duckdb_extract_statements, the extracted statements should always be destroyed usingduckdb_destroy_extracted, even if no statements were extracted. - duckdb_
extract_ ⚠statements_ error - Returns the error message contained within the extracted statements.
The result of this function must not be freed. It will be cleaned up when
duckdb_destroy_extractedis called. - duckdb_
fetch_ ⚠chunk - Fetches a data chunk from a duckdb_result. This function should be called repeatedly until the result is exhausted.
- duckdb_
file_ ⚠handle_ close - Closes the given file handle.
- duckdb_
file_ ⚠handle_ error_ data - Retrieves the last error that occurred on the given file handle.
- duckdb_
file_ ⚠handle_ read - Reads data from the file into the buffer.
- duckdb_
file_ ⚠handle_ seek - Seeks to a specific position in the file.
- duckdb_
file_ ⚠handle_ size - Gets the size of the file.
- duckdb_
file_ ⚠handle_ sync - Synchronizes the file’s state with the underlying storage.
- duckdb_
file_ ⚠handle_ tell - Tells the current position in the file.
- duckdb_
file_ ⚠handle_ write - Writes data from the buffer to the file.
- duckdb_
file_ ⚠open_ options_ set_ flag - Sets a specific flag in the file open options.
- duckdb_
file_ ⚠system_ error_ data - Retrieves the last error that occurred on the given file system instance.
- duckdb_
file_ ⚠system_ open - Opens a file at the given path with the specified options.
- duckdb_
finish_ ⚠execution - Finish execution on a specific task.
- duckdb_
free ⚠ - Free a value returned from
duckdb_malloc,duckdb_value_varchar,duckdb_value_blob, orduckdb_value_string. - duckdb_
from_ ⚠date - Decompose a
duckdb_dateobject into year, month and date (stored asduckdb_date_struct). - duckdb_
from_ ⚠time - Decompose a
duckdb_timeobject into hour, minute, second and microsecond (stored asduckdb_time_struct). - duckdb_
from_ ⚠time_ tz - Decompose a TIME_TZ objects into micros and a timezone offset.
- duckdb_
from_ ⚠timestamp - Decompose a
duckdb_timestampobject into aduckdb_timestamp_struct. - duckdb_
function_ ⚠get_ bind_ data - Gets the table function’s bind data set by
duckdb_bind_set_bind_data. - duckdb_
function_ ⚠get_ extra_ info - Retrieves the extra info of the function as set in
duckdb_table_function_set_extra_info. - duckdb_
function_ ⚠get_ init_ data - Gets the init data set by
duckdb_init_set_init_dataduring the init. - duckdb_
function_ ⚠get_ local_ init_ data - Gets the thread-local init data set by
duckdb_init_set_init_dataduring the local_init. - duckdb_
function_ ⚠set_ error - Report that an error has occurred while executing the function.
- duckdb_
geometry_ ⚠type_ get_ crs - Gets the CRS (Coordinate Reference System) of a GEOMETRY type.
Result must be freed with
duckdb_free. - duckdb_
get_ ⚠bignum - Returns the duckdb_bignum value of the given value.
The
datafield must be destroyed withduckdb_free. - duckdb_
get_ ⚠bit - Returns the duckdb_bit value of the given value.
The
datafield must be destroyed withduckdb_free. - duckdb_
get_ ⚠blob - Returns the blob value of the given value.
- duckdb_
get_ ⚠bool - Returns the boolean value of the given value.
- duckdb_
get_ ⚠config_ flag - Obtains a human-readable name and description of a specific configuration option. This can be used to e.g.
display configuration options. This will succeed unless
indexis out of range (i.e.>= duckdb_config_count). - duckdb_
get_ ⚠date - Returns the date value of the given value.
- duckdb_
get_ ⚠decimal - Returns the duckdb_decimal value of the given value.
- duckdb_
get_ ⚠double - Returns the double value of the given value.
- duckdb_
get_ ⚠enum_ value - Returns the enum value of the given value.
- duckdb_
get_ ⚠float - Returns the float value of the given value.
- duckdb_
get_ ⚠hugeint - Returns the hugeint value of the given value.
- duckdb_
get_ ⚠int8 - Returns the int8_t value of the given value.
- duckdb_
get_ ⚠int16 - Returns the int16_t value of the given value.
- duckdb_
get_ ⚠int32 - Returns the int32_t value of the given value.
- duckdb_
get_ ⚠int64 - Returns the int64_t value of the given value.
- duckdb_
get_ ⚠interval - Returns the interval value of the given value.
- duckdb_
get_ ⚠list_ child - Returns the LIST child at index as a duckdb_value.
- duckdb_
get_ ⚠list_ size - Returns the number of elements in a LIST value.
- duckdb_
get_ ⚠map_ key - Returns the MAP key at index as a duckdb_value.
- duckdb_
get_ ⚠map_ size - Returns the number of elements in a MAP value.
- duckdb_
get_ ⚠map_ value - Returns the MAP value at index as a duckdb_value.
- duckdb_
get_ ⚠or_ create_ from_ cache - Creates a new database instance in the instance cache, or retrieves an existing database instance. Must be closed with ‘duckdb_close’.
- duckdb_
get_ ⚠profiling_ info - Returns the root node of the profiling information. Returns nullptr, if profiling is not enabled.
- duckdb_
get_ ⚠struct_ child - Returns the STRUCT child at index as a duckdb_value.
- duckdb_
get_ ⚠table_ names - Get the list of (fully qualified) table names of the query.
- duckdb_
get_ ⚠time - Returns the time value of the given value.
- duckdb_
get_ ⚠time_ ns - Returns the time_ns value of the given value.
- duckdb_
get_ ⚠time_ tz - Returns the time_tz value of the given value.
- duckdb_
get_ ⚠timestamp - Returns the TIMESTAMP value of the given value.
- duckdb_
get_ ⚠timestamp_ ms - Returns the duckdb_timestamp_ms value of the given value.
- duckdb_
get_ ⚠timestamp_ ns - Returns the duckdb_timestamp_ns value of the given value.
- duckdb_
get_ ⚠timestamp_ s - Returns the duckdb_timestamp_s value of the given value.
- duckdb_
get_ ⚠timestamp_ tz - Returns the TIMESTAMP_TZ value of the given value.
- duckdb_
get_ ⚠type_ id - Retrieves the enum
duckdb_typeof aduckdb_logical_type. - duckdb_
get_ ⚠uhugeint - Returns the uhugeint value of the given value.
- duckdb_
get_ ⚠uint8 - Returns the uint8_t value of the given value.
- duckdb_
get_ ⚠uint16 - Returns the uint16_t value of the given value.
- duckdb_
get_ ⚠uint32 - Returns the uint32_t value of the given value.
- duckdb_
get_ ⚠uint64 - Returns the uint64_t value of the given value.
- duckdb_
get_ ⚠uuid - Returns a duckdb_uhugeint representing the UUID value of the given value.
- duckdb_
get_ ⚠value_ type - Returns the type of the given value. The type is valid as long as the value is not destroyed. The type itself must not be destroyed.
- duckdb_
get_ ⚠varchar - Obtains a string representation of the given value.
The result must be destroyed with
duckdb_free. - duckdb_
hugeint_ ⚠to_ double - Converts a duckdb_hugeint object (as obtained from a
DUCKDB_TYPE_HUGEINTcolumn) into a double. - duckdb_
init_ ⚠get_ bind_ data - Gets the bind data set by
duckdb_bind_set_bind_dataduring the bind. - duckdb_
init_ ⚠get_ column_ count - Returns the number of projected columns.
- duckdb_
init_ ⚠get_ column_ index - Returns the column index of the projected column at the specified position.
- duckdb_
init_ ⚠get_ extra_ info - Retrieves the extra info of the function as set in
duckdb_table_function_set_extra_info. - duckdb_
init_ ⚠set_ error - Report that an error has occurred while calling init.
- duckdb_
init_ ⚠set_ init_ data - Sets the user-provided init data in the init object. This object can be retrieved again during execution.
- duckdb_
init_ ⚠set_ max_ threads - Sets how many threads can process this table function in parallel (default: 1)
- duckdb_
interrupt ⚠ - Interrupt running query
- duckdb_
is_ ⚠finite_ date - Test a
duckdb_dateto see if it is a finite value. - duckdb_
is_ ⚠finite_ timestamp - Test a
duckdb_timestampto see if it is a finite value. - duckdb_
is_ ⚠finite_ timestamp_ ms - Test a
duckdb_timestamp_msto see if it is a finite value. - duckdb_
is_ ⚠finite_ timestamp_ ns - Test a
duckdb_timestamp_nsto see if it is a finite value. - duckdb_
is_ ⚠finite_ timestamp_ s - Test a
duckdb_timestamp_sto see if it is a finite value. - duckdb_
is_ ⚠null_ value - Returns whether the value’s type is SQLNULL or not.
- duckdb_
library_ ⚠version - Returns the version of the linked DuckDB, with a version postfix for dev versions
- duckdb_
list_ ⚠type_ child_ type - Retrieves the child type of the given LIST type. Also accepts MAP types.
The result must be freed with
duckdb_destroy_logical_type. - duckdb_
list_ ⚠vector_ get_ child - Retrieves the child vector of a list vector.
- duckdb_
list_ ⚠vector_ get_ size - Returns the size of the child vector of the list.
- duckdb_
list_ ⚠vector_ reserve - Sets the capacity of the underlying child-vector of a list vector.
We increment to the next power of two, based on the required capacity.
Thus, the capacity might not match the size of the list (capacity >= size),
which is set via
duckdb_list_vector_set_size. - duckdb_
list_ ⚠vector_ set_ size - Sets the size of the underlying child-vector of a list vector.
Note that this does NOT reserve the memory in the child buffer,
and that it is possible to set a size exceeding the capacity.
To set the capacity, use
duckdb_list_vector_reserve. - duckdb_
log_ ⚠storage_ set_ extra_ data - Sets the extra data of the custom log storage.
- duckdb_
log_ ⚠storage_ set_ name - Sets the name of the log storage.
- duckdb_
log_ ⚠storage_ set_ write_ log_ entry - Sets the callback function for writing log entries.
- duckdb_
logical_ ⚠type_ get_ alias - Returns the alias of a duckdb_logical_type, if set, else
nullptr. The result must be destroyed withduckdb_free. - duckdb_
logical_ ⚠type_ set_ alias - Sets the alias of a duckdb_logical_type.
- duckdb_
malloc ⚠ - Allocate
sizebytes of memory using the duckdb internal malloc function. Any memory allocated in this manner should be freed usingduckdb_free. - duckdb_
map_ ⚠type_ key_ type - Retrieves the key type of the given map type.
- duckdb_
map_ ⚠type_ value_ type - Retrieves the value type of the given map type.
- duckdb_
nparams ⚠ - Returns the number of parameters that can be provided to the given prepared statement.
- duckdb_
nullmask_ ⚠data - DEPRECATED**: Prefer using
duckdb_result_get_chunkinstead. - duckdb_
open ⚠ - Creates a new database or opens an existing database file stored at the given path. If no path is given a new in-memory database is created instead. The database must be closed with ‘duckdb_close’.
- duckdb_
open_ ⚠ext - Extended version of duckdb_open. Creates a new database or opens an existing database file stored at the given path. The database must be closed with ‘duckdb_close’.
- duckdb_
param_ ⚠logical_ type - Returns the logical type for the parameter at the given index.
- duckdb_
param_ ⚠type - Returns the parameter type for the parameter at the given index.
- duckdb_
parameter_ ⚠name - Returns the name used to identify the parameter
The returned string should be freed using
duckdb_free. - duckdb_
pending_ ⚠error - Returns the error message contained within the pending result.
- duckdb_
pending_ ⚠execute_ check_ state - If this returns DUCKDB_PENDING_RESULT_READY, the duckdb_execute_pending function can be called to obtain the result. If this returns DUCKDB_PENDING_RESULT_NOT_READY, the duckdb_pending_execute_check_state function should be called again. If this returns DUCKDB_PENDING_ERROR, an error occurred during execution.
- duckdb_
pending_ ⚠execute_ task - Executes a single task within the query, returning whether or not the query is ready.
- duckdb_
pending_ ⚠execution_ is_ finished - Returns whether a duckdb_pending_state is finished executing. For example if
pending_stateis DUCKDB_PENDING_RESULT_READY, this function will return true. - duckdb_
pending_ ⚠prepared - Executes the prepared statement with the given bound parameters, and returns a pending result. The pending result represents an intermediate structure for a query that is not yet fully executed. The pending result can be used to incrementally execute a query, returning control to the client between tasks.
- duckdb_
pending_ ⚠prepared_ streaming - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
prepare ⚠ - Create a prepared statement object from a query.
- duckdb_
prepare_ ⚠error - Returns the error message associated with the given prepared statement.
If the prepared statement has no error message, this returns
nullptrinstead. - duckdb_
prepare_ ⚠extracted_ statement - Prepare an extracted statement.
Note that after calling
duckdb_prepare_extracted_statement, the prepared statement should always be destroyed usingduckdb_destroy_prepare, even if the prepare fails. - duckdb_
prepared_ ⚠arrow_ schema - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
prepared_ ⚠statement_ column_ count - Returns the number of columns present in a the result of the prepared statement. If any of the column types are invalid, the result will be 1.
- duckdb_
prepared_ ⚠statement_ column_ logical_ type - Returns the column type of the specified column of the result of the prepared_statement.
- duckdb_
prepared_ ⚠statement_ column_ name - Returns the name of the specified column of the result of the prepared_statement.
The returned string should be freed using
duckdb_free. - duckdb_
prepared_ ⚠statement_ column_ type - Returns the column type of the specified column of the result of the prepared_statement.
- duckdb_
prepared_ ⚠statement_ type - Returns the statement type of the statement to be executed
- duckdb_
profiling_ ⚠info_ get_ child - Returns the child node at the specified index.
- duckdb_
profiling_ ⚠info_ get_ child_ count - Returns the number of children in the current profiling info node.
- duckdb_
profiling_ ⚠info_ get_ metrics - Returns the key-value metric map of this profiling node as a MAP duckdb_value. The individual elements are accessible via the duckdb_value MAP functions.
- duckdb_
profiling_ ⚠info_ get_ value - Returns the value of the metric of the current profiling info node. Returns nullptr, if the metric does not exist or is not enabled. Currently, the value holds a string, and you can retrieve the string by calling the corresponding function: char *duckdb_get_varchar(duckdb_value value).
- duckdb_
query ⚠ - Executes a SQL query within a connection and stores the full (materialized) result in the out_result pointer.
If the query fails to execute, DuckDBError is returned and the error message can be retrieved by calling
duckdb_result_error. - duckdb_
query_ ⚠arrow - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
query_ ⚠arrow_ array - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
query_ ⚠arrow_ error - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
query_ ⚠arrow_ schema - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
query_ ⚠progress - Get the progress of the running query.
- duckdb_
register_ ⚠aggregate_ function - Register the aggregate function object within the given connection.
- duckdb_
register_ ⚠aggregate_ function_ set - Register the aggregate function set within the given connection.
- duckdb_
register_ ⚠cast_ function - Registers a cast function within the given connection.
- duckdb_
register_ ⚠config_ option - Registers the given configuration option on the specified connection.
- duckdb_
register_ ⚠copy_ function - Registers the given copy function on the database connection under the specified name.
- duckdb_
register_ ⚠log_ storage - Registers a custom log storage for the logger.
- duckdb_
register_ ⚠logical_ type - Registers a custom type within the given connection. The type must have an alias
- duckdb_
register_ ⚠scalar_ function - Register the scalar function object within the given connection.
- duckdb_
register_ ⚠scalar_ function_ set - Register the scalar function set within the given connection.
- duckdb_
register_ ⚠table_ function - Register the table function object within the given connection.
- duckdb_
replacement_ ⚠scan_ add_ parameter - Adds a parameter to the replacement scan function.
- duckdb_
replacement_ ⚠scan_ set_ error - Report that an error has occurred while executing the replacement scan.
- duckdb_
replacement_ ⚠scan_ set_ function_ name - Sets the replacement function name. If this function is called in the replacement callback, the replacement scan is performed. If it is not called, the replacement callback is not performed.
- duckdb_
result_ ⚠arrow_ array - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
result_ ⚠chunk_ count - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
result_ ⚠error - Returns the error message contained within the result. The error is only set if
duckdb_queryreturnsDuckDBError. - duckdb_
result_ ⚠error_ type - Returns the result error type contained within the result. The error is only set if
duckdb_queryreturnsDuckDBError. - duckdb_
result_ ⚠get_ arrow_ options - Returns the arrow options associated with the given result. These options are definitions of how the arrow arrays/schema
should be produced.
@param result The result object to fetch arrow options from.
@return The arrow options associated with the given result. This must be destroyed with
duckdb_destroy_arrow_options. - duckdb_
result_ ⚠get_ chunk - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
result_ ⚠is_ streaming - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
result_ ⚠return_ type - Returns the return_type of the given result, or DUCKDB_RETURN_TYPE_INVALID on error
- duckdb_
result_ ⚠statement_ type - Returns the statement type of the statement that was executed
- duckdb_
row_ ⚠count - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
rows_ ⚠changed - Returns the number of rows changed by the query stored in the result. This is relevant only for INSERT/UPDATE/DELETE queries. For other queries the rows_changed will be 0.
- duckdb_
scalar_ ⚠function_ add_ parameter - Adds a parameter to the scalar function.
- duckdb_
scalar_ ⚠function_ bind_ get_ argument - Returns the input argument at index of the scalar function.
- duckdb_
scalar_ ⚠function_ bind_ get_ argument_ count - Returns the number of input arguments of the scalar function.
- duckdb_
scalar_ ⚠function_ bind_ get_ extra_ info - Retrieves the extra info of the function as set in the bind info.
- duckdb_
scalar_ ⚠function_ bind_ set_ error - Report that an error has occurred while calling bind on a scalar function.
- duckdb_
scalar_ ⚠function_ get_ bind_ data - Gets the scalar function’s bind data set by
duckdb_scalar_function_set_bind_data. Note that the bind data is read-only. - duckdb_
scalar_ ⚠function_ get_ client_ context - Retrieves the client context of the bind info of a scalar function.
- duckdb_
scalar_ ⚠function_ get_ extra_ info - Retrieves the extra info of the function as set in
duckdb_scalar_function_set_extra_info. - duckdb_
scalar_ ⚠function_ get_ state - Retrieves the state pointer of the function info.
- duckdb_
scalar_ ⚠function_ init_ get_ bind_ data - Gets the scalar function’s bind data set by
duckdb_scalar_function_set_bind_data. Note that the bind data is read-only. - duckdb_
scalar_ ⚠function_ init_ get_ client_ context - Retrieves the client context of the init info of a scalar function.
- duckdb_
scalar_ ⚠function_ init_ get_ extra_ info - Retrieves the extra info of the function as set in the init info.
- duckdb_
scalar_ ⚠function_ init_ set_ error - Report that an error has occurred while calling init on a scalar function.
- duckdb_
scalar_ ⚠function_ init_ set_ state - Sets the state pointer in the init info of the scalar function.
- duckdb_
scalar_ ⚠function_ set_ bind - Sets the (optional) bind function of the scalar function.
- duckdb_
scalar_ ⚠function_ set_ bind_ data - Sets the user-provided bind data in the bind object of the scalar function. The bind data object can be retrieved again during execution. In most case, you also need to set the copy-callback of your bind data via duckdb_scalar_function_set_bind_data_copy.
- duckdb_
scalar_ ⚠function_ set_ bind_ data_ copy - Sets the copy-callback for the user-provided bind data in the bind object of the scalar function.
- duckdb_
scalar_ ⚠function_ set_ error - Report that an error has occurred while executing the scalar function.
- duckdb_
scalar_ ⚠function_ set_ extra_ info - Assigns extra information to the scalar function that can be fetched during binding, etc.
- duckdb_
scalar_ ⚠function_ set_ function - Sets the main function of the scalar function.
- duckdb_
scalar_ ⚠function_ set_ init - Sets the (optional) state init function of the scalar function. This is called once for each worker thread that begins executing the function @param scalar_function The scalar function. @param init The init function.
- duckdb_
scalar_ ⚠function_ set_ name - Sets the name of the given scalar function.
- duckdb_
scalar_ ⚠function_ set_ return_ type - Sets the return type of the scalar function.
- duckdb_
scalar_ ⚠function_ set_ special_ handling - Sets the scalar function’s null-handling behavior to special.
- duckdb_
scalar_ ⚠function_ set_ varargs - Sets the parameters of the given scalar function to varargs. Does not require adding parameters with duckdb_scalar_function_add_parameter.
- duckdb_
scalar_ ⚠function_ set_ volatile - Sets the Function Stability of the scalar function to VOLATILE, indicating the function should be re-run for every row. This limits optimization that can be performed for the function.
- duckdb_
schema_ ⚠from_ arrow - Transforms an Arrow Schema into a DuckDB Schema.
- duckdb_
selection_ ⚠vector_ get_ data_ ptr - Access the data pointer of a selection vector.
- duckdb_
set_ ⚠config - Sets the specified option for the specified configuration. The configuration option is indicated by name.
To obtain a list of config options, see
duckdb_get_config_flag. - duckdb_
slice_ ⚠vector - Slice a vector with a selection vector. The length of the selection vector must be less than or equal to the length of the vector. Turns the vector into a dictionary vector.
- duckdb_
stream_ ⚠fetch_ chunk - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
string_ ⚠is_ inlined - Whether or not the duckdb_string_t value is inlined. This means that the data of the string does not have a separate allocation.
- duckdb_
string_ ⚠t_ data - Get a pointer to the string data of a string_t
- duckdb_
string_ ⚠t_ length - Get the string length of a string_t
- duckdb_
struct_ ⚠type_ child_ count - Returns the number of children of a struct type.
- duckdb_
struct_ ⚠type_ child_ name - Retrieves the name of the struct child.
- duckdb_
struct_ ⚠type_ child_ type - Retrieves the child type of the given struct type at the specified index.
- duckdb_
struct_ ⚠vector_ get_ child - Retrieves the child vector of a struct vector. The resulting vector is valid as long as the parent vector is valid.
- duckdb_
table_ ⚠description_ create - Creates a table description object. Note that
duckdb_table_description_destroyshould always be called on the resulting table_description, even if the function returnsDuckDBError. - duckdb_
table_ ⚠description_ create_ ext - Creates a table description object. Note that
duckdb_table_description_destroymust be called on the resulting table_description, even if the function returnsDuckDBError. - duckdb_
table_ ⚠description_ destroy - Destroy the TableDescription object.
- duckdb_
table_ ⚠description_ error - Returns the error message associated with the given table_description.
If the table_description has no error message, this returns
nullptrinstead. The error message should not be freed. It will be de-allocated whenduckdb_table_description_destroyis called. - duckdb_
table_ ⚠description_ get_ column_ count - Return the number of columns of the described table.
- duckdb_
table_ ⚠description_ get_ column_ name - Obtain the column name at ‘index’.
The out result must be destroyed with
duckdb_free. - duckdb_
table_ ⚠description_ get_ column_ type - Obtain the column type at ‘index’.
The return value must be destroyed with
duckdb_destroy_logical_type. - duckdb_
table_ ⚠function_ add_ named_ parameter - Adds a named parameter to the table function.
- duckdb_
table_ ⚠function_ add_ parameter - Adds a parameter to the table function.
- duckdb_
table_ ⚠function_ bind_ get_ result_ column_ count - Retrieves the number of result columns of a table function.
- duckdb_
table_ ⚠function_ bind_ get_ result_ column_ name - Retrieves the name of a result column of a table function.
- duckdb_
table_ ⚠function_ bind_ get_ result_ column_ type - Retrieves the type of a result column of a table function.
- duckdb_
table_ ⚠function_ get_ client_ context - Retrieves the client context of the bind info of a table function.
- duckdb_
table_ ⚠function_ set_ bind - Sets the bind function of the table function.
- duckdb_
table_ ⚠function_ set_ extra_ info - Assigns extra information to the table function that can be fetched during binding, etc.
- duckdb_
table_ ⚠function_ set_ function - Sets the main function of the table function.
- duckdb_
table_ ⚠function_ set_ init - Sets the init function of the table function.
- duckdb_
table_ ⚠function_ set_ local_ init - Sets the thread-local init function of the table function.
- duckdb_
table_ ⚠function_ set_ name - Sets the name of the given table function.
- duckdb_
table_ ⚠function_ supports_ projection_ pushdown - Sets whether or not the given table function supports projection pushdown.
- duckdb_
task_ ⚠state_ is_ finished - Check if the provided duckdb_task_state has finished execution
- duckdb_
to_ ⚠arrow_ schema - Transforms a DuckDB Schema into an Arrow Schema
- duckdb_
to_ ⚠date - Re-compose a
duckdb_datefrom year, month and date (duckdb_date_struct). - duckdb_
to_ ⚠time - Re-compose a
duckdb_timefrom hour, minute, second and microsecond (duckdb_time_struct). - duckdb_
to_ ⚠timestamp - Re-compose a
duckdb_timestampfrom a duckdb_timestamp_struct. - duckdb_
uhugeint_ ⚠to_ double - Converts a duckdb_uhugeint object (as obtained from a
DUCKDB_TYPE_UHUGEINTcolumn) into a double. - duckdb_
union_ ⚠type_ member_ count - Returns the number of members that the union type has.
- duckdb_
union_ ⚠type_ member_ name - Retrieves the name of the union member.
- duckdb_
union_ ⚠type_ member_ type - Retrieves the child type of the given union member at the specified index.
- duckdb_
unsafe_ ⚠vector_ assign_ string_ element_ len - Assigns a string element in the vector at the specified location without UTF-8 validation. The caller is responsible for
ensuring the input is valid UTF-8. Use
duckdb_valid_utf8_checkto validate strings before calling this function if needed. If the input is known to be valid UTF-8, this function can be called directly for better performance, avoiding the overhead of redundant validation. - duckdb_
valid_ ⚠utf8_ check - Checks if a string is valid UTF-8.
- duckdb_
validity_ ⚠row_ is_ valid - Returns whether or not a row is valid (i.e. not NULL) in the given validity mask.
- duckdb_
validity_ ⚠set_ row_ invalid - In a validity mask, sets a specific row to invalid.
- duckdb_
validity_ ⚠set_ row_ valid - In a validity mask, sets a specific row to valid.
- duckdb_
validity_ ⚠set_ row_ validity - In a validity mask, sets a specific row to either valid or invalid.
- duckdb_
value_ ⚠blob - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠boolean - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠date - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠decimal - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠double - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠float - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠hugeint - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠int8 - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠int16 - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠int32 - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠int64 - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠interval - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠is_ null - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠string - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠string_ internal - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠time - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠timestamp - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠to_ string - Returns the SQL string representation of the given value.
- duckdb_
value_ ⚠uhugeint - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠uint8 - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠uint16 - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠uint32 - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠uint64 - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠varchar - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
value_ ⚠varchar_ internal - DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
- duckdb_
vector_ ⚠assign_ string_ element - Assigns a string element in the vector at the specified location. For VARCHAR vectors, the input is validated as UTF-8; if invalid, a NULL value is assigned at that index.
- duckdb_
vector_ ⚠assign_ string_ element_ len - Assigns a string element in the vector at the specified location. For VARCHAR vectors, the input is validated as UTF-8; if invalid, a NULL value is assigned at that index. For BLOB vectors, no validation is performed.
- duckdb_
vector_ ⚠copy_ sel - Copy the src vector to the dst with a selection vector that identifies which indices to copy.
- duckdb_
vector_ ⚠ensure_ validity_ writable - Ensures the validity mask is writable by allocating it.
- duckdb_
vector_ ⚠get_ column_ type - Retrieves the column type of the specified vector.
- duckdb_
vector_ ⚠get_ data - Retrieves the data pointer of the vector.
- duckdb_
vector_ ⚠get_ validity - Retrieves the validity mask pointer of the specified vector.
- duckdb_
vector_ ⚠reference_ value - Copies the value from
valuetovector. - duckdb_
vector_ ⚠reference_ vector - Changes
to_vectorto reference `from_vector. After, the vectors share ownership of the data. - duckdb_
vector_ ⚠size - The internal vector size used by DuckDB.
This is the amount of tuples that will fit into a data chunk created by
duckdb_create_data_chunk.
Type Aliases§
- DUCKDB_
TYPE - ! An enum over DuckDB’s internal types. ! An enum over DuckDB’s internal types.
- duckdb_
aggregate_ combine_ t - ! A function to combine aggregate states.
- duckdb_
aggregate_ destroy_ t - ! An optional function to destroy an aggregate state.
- duckdb_
aggregate_ finalize_ t - ! A function to finalize aggregate states into a result vector.
- duckdb_
aggregate_ function - ! An aggregate function. Must be destroyed with
duckdb_destroy_aggregate_function. - duckdb_
aggregate_ function_ set - ! A aggregate function set. Must be destroyed with
duckdb_destroy_aggregate_function_set. - duckdb_
aggregate_ init_ t - ! A function to initialize an aggregate state.
- duckdb_
aggregate_ state - ! The state of an aggregate function.
- duckdb_
aggregate_ state_ size - ! A function to return the aggregate state’s size.
- duckdb_
aggregate_ update_ t - ! A function to update a set of aggregate states with new values.
- duckdb_
appender - ! The appender enables fast data loading into DuckDB.
! Must be destroyed with
duckdb_appender_destroy. - duckdb_
arrow - ! Holds an arrow query result. Must be destroyed with
duckdb_destroy_arrow. - duckdb_
arrow_ array - ! Holds an arrow array. Remember to release the respective ArrowSchema object.
- duckdb_
arrow_ converted_ schema - ! Holds an arrow converted schema (i.e., duckdb::ArrowTableSchema).
! In practice, this object holds the information necessary to do proper conversion between Arrow Types and DuckDB
! Types. Check duckdb/function/table/arrow/arrow_duck_schema.hpp for more details! Must be destroyed with
!
duckdb_destroy_arrow_converted_schema - duckdb_
arrow_ options - ! The arrow options used when transforming the DuckDB schema and datachunks into Arrow schema and arrays.
! Used in
duckdb_to_arrow_schemaandduckdb_data_chunk_to_arrow - duckdb_
arrow_ schema - ! Holds an arrow schema. Remember to release the respective ArrowSchema object.
- duckdb_
arrow_ stream - ! Holds an arrow array stream. Must be destroyed with
duckdb_destroy_arrow_stream. - duckdb_
bind_ info - ! The bind info of a function. ! When setting this info, it is necessary to pass a destroy-callback function.
- duckdb_
cast_ function - ! A cast function. Must be destroyed with
duckdb_destroy_cast_function. - duckdb_
cast_ function_ t - ! The function to cast from an input vector to an output vector.
- duckdb_
cast_ mode - ! An enum over DuckDB’s different cast modes.
- duckdb_
catalog - ! A handle to a database catalog.
! Must be destroyed with
duckdb_destroy_catalog. - duckdb_
catalog_ entry - ! A handle to a catalog entry (e.g., table, view, index, etc.).
! Must be destroyed with
duckdb_destroy_catalog_entry. - duckdb_
catalog_ entry_ type - ! An enum over DuckDB’s catalog entry types.
- duckdb_
client_ context - ! A client context of a duckdb connection. Must be destroyed with
duckdb_destroy_context. - duckdb_
config - ! The configuration can be used to provide start-up options for a database.
! Must be destroyed with
duckdb_destroy_config. - duckdb_
config_ option - ! A custom configuration option instance. Used to register custom options that can be set on a duckdb_config.
! or by the user in SQL using
SET <option_name> = <value>. - duckdb_
config_ option_ scope - ! An enum over DuckDB’s configuration option scopes. ! This enum can be used to specify the default scope when creating a custom configuration option, ! but it is also be used to determine the scope in which a configuration option is set when it is ! changed or retrieved.
- duckdb_
connection - ! A connection to a duckdb database. Must be closed with
duckdb_disconnect. - duckdb_
copy_ callback_ t - ! The callback to copy data, e.g., bind data (if any).
- duckdb_
copy_ function - ! A COPY function. Must be destroyed with
duckdb_destroy_copy_function. - duckdb_
copy_ function_ bind_ info - ! Info for the bind function of a COPY function.
- duckdb_
copy_ function_ bind_ t - ! The bind function to use when binding a COPY … TO function.
- duckdb_
copy_ function_ finalize_ info - ! Info for the finalize function of a COPY function.
- duckdb_
copy_ function_ finalize_ t - ! The function to finalize the COPY … TO function execution.
- duckdb_
copy_ function_ global_ init_ info - ! Info for the global initialization function of a COPY function.
- duckdb_
copy_ function_ global_ init_ t - ! The initialization function to use when initializing a COPY … TO function.
- duckdb_
copy_ function_ sink_ info - ! Info for the sink function of a COPY function.
- duckdb_
copy_ function_ sink_ t - ! The function to sink an input chunk into during execution of a COPY … TO function.
- duckdb_
create_ type_ info - ! Holds extra information to register a custom logical type. ! Reserved for future use.
- duckdb_
data_ chunk - ! Contains a data chunk of a duckdb_result.
! Must be destroyed with
duckdb_destroy_data_chunk. - duckdb_
database - ! A database object. Must be closed with
duckdb_close. - duckdb_
delete_ callback_ t - ! The callback to destroy data, e.g., ! bind data (if any), init data (if any), extra data for replacement scans (if any), etc.
- duckdb_
error_ data - ! Holds error data.
! Must be destroyed with
duckdb_destroy_error_data. - duckdb_
error_ type - ! An enum over DuckDB’s different error types.
- duckdb_
expression - ! Holds a bound expression.
! Must be destroyed with
duckdb_destroy_expression. - duckdb_
extension_ info - ! Holds the state of the C API extension initialization process.
- duckdb_
extracted_ statements - ! Extracted statements. Must be destroyed with
duckdb_destroy_extracted. - duckdb_
file_ flag - duckdb_
file_ handle - duckdb_
file_ open_ options - duckdb_
file_ system - duckdb_
function_ info - ! Additional function info. ! When setting this info, it is necessary to pass a destroy-callback function.
- duckdb_
init_ info - ! Additional function initialization info. ! When setting this info, it is necessary to pass a destroy-callback function.
- duckdb_
instance_ cache - ! A database instance cache object. Must be destroyed with
duckdb_destroy_instance_cache. - duckdb_
log_ storage - ! Holds a log storage object.
- duckdb_
logger_ write_ log_ entry_ t - ! This function is missing the logging context, which will be added later.
- duckdb_
logical_ type - ! A logical type.
! Must be destroyed with
duckdb_destroy_logical_type. - duckdb_
pending_ result - ! The pending result represents an intermediate structure for a query that is not yet fully executed.
! Must be destroyed with
duckdb_destroy_pending. - duckdb_
pending_ state - ! An enum over the pending state of a pending query result.
- duckdb_
prepared_ statement - ! A prepared statement is a parameterized query that allows you to bind parameters to it.
! Must be destroyed with
duckdb_destroy_prepare. - duckdb_
profiling_ info - ! Holds a recursive tree containing profiling metrics. ! The tree matches the query plan, and has a top-level node.
- duckdb_
replacement_ callback_ t - ! A replacement scan function.
- duckdb_
replacement_ scan_ info - ! Additional replacement scan info. When setting this info, it is necessary to pass a destroy-callback function.
- duckdb_
result_ type - ! An enum over DuckDB’s different result types.
- duckdb_
scalar_ function - ! A scalar function. Must be destroyed with
duckdb_destroy_scalar_function. - duckdb_
scalar_ function_ bind_ t - ! The bind function callback of the scalar function.
- duckdb_
scalar_ function_ init_ t - ! The thread-local initialization function of the scalar function.
- duckdb_
scalar_ function_ set - ! A scalar function set. Must be destroyed with
duckdb_destroy_scalar_function_set. - duckdb_
scalar_ function_ t - ! The function to execute the scalar function on an input chunk.
- duckdb_
selection_ vector - ! A selection vector is a vector of indices, which usually refer to values in a vector. ! Can be used to slice vectors, changing their length and the order of their entries. ! Standalone selection vectors must be destroyed.
- duckdb_
state - ! An enum over the returned state of different functions.
- duckdb_
statement_ type - ! An enum over DuckDB’s different statement types.
- duckdb_
table_ description - ! The table description allows querying information about the table.
! Must be destroyed with
duckdb_table_description_destroy. - duckdb_
table_ function - ! A table function. Must be destroyed with
duckdb_destroy_table_function. - duckdb_
table_ function_ bind_ t - ! The bind function of the table function.
- duckdb_
table_ function_ init_ t - ! The possibly thread-local initialization function of the table function.
- duckdb_
table_ function_ t - ! The function to generate an output chunk during table function execution.
- duckdb_
task_ state - ! Used for threading, contains a task state.
! Must be destroyed with
duckdb_destroy_task_state. - duckdb_
type - ! An enum over DuckDB’s internal types. ! An enum over DuckDB’s internal types.
- duckdb_
value - ! A value of a logical type.
! Must be destroyed with
duckdb_destroy_value. - duckdb_
vector - ! 1. A standalone vector that must be destroyed, or ! 2. A vector to a column in a data chunk that lives as long as the data chunk lives.
- idx_t
- ! DuckDB’s index type.
- sel_t
- ! Type definition for the data pointers of selection vectors.