Crate libduckdb_sys

Source

Structs§

DuckDbString
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
! Aggregate state
_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 ArrowArray object.
_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 the 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_config
! Can be used to provide start-up options for the DuckDB instance. ! Must be destroyed with duckdb_destroy_config.
_duckdb_connection
! A connection to a duckdb database. Must be closed with duckdb_disconnect.
_duckdb_create_type_info
! Holds extra information used when registering a custom logical type. ! Reserved for future use.
_duckdb_data_chunk
! Contains a data chunk from a duckdb_result. ! Must be destroyed with duckdb_destroy_data_chunk.
_duckdb_database
! A database object. Must be closed with duckdb_close.
_duckdb_extension_info
! Holds state during the C API extension intialization process
_duckdb_extracted_statements
! Extracted statements. Must be destroyed with duckdb_destroy_extracted.
_duckdb_function_info
! Additional function info. When setting this info, it is necessary to pass a destroy-callback function.
_duckdb_init_info
! Additional function init 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_logical_type
! Holds an internal 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 that matches the query plan.
_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_table_description
! The table description allows querying info 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
! Holds a DuckDB value, which wraps a type. ! Must be destroyed with duckdb_destroy_value.
_duckdb_vector
! A vector to a specified column in a data chunk. Lives as long as the ! data chunk lives, i.e., must not be destroyed.
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. ! This number of bits of the second byte are set to 1, starting from the MSB. ! You must free data with duckdb_free.
duckdb_blob
! BLOBs are composed of a byte pointer and a size. You must free blob.data ! with duckdb_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, and duckdb_column_name, which take the result and the column index ! as their parameters
duckdb_date
! Days are stored as days since 1970-01-01 ! Use the duckdb_from_date/duckdb_to_date function to extract individual information
duckdb_date_struct
duckdb_decimal
! Decimals are composed of a width and a scale, and are stored in a hugeint
duckdb_extension_access
! Passed to C API extension as parameter to the entrypoint
duckdb_hugeint
! Hugeints are composed of a (lower, upper) component ! The value of the hugeint is upper * 2^64 + lower ! For easy usage, the functions duckdb_hugeint_to_double/duckdb_double_to_hugeint are recommended
duckdb_interval
duckdb_list_entry
! The internal representation of a list metadata entry contains the list’s offset in ! the child vector, and its length. The parent vector holds these metadata entries, ! whereas the child vector holds the data
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 char pointer and a size. You must free string.data ! with duckdb_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 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_time/duckdb_to_time function to extract individual information
duckdb_time_struct
duckdb_time_tz
! TIME_TZ is stored as 40 bits for int64_t micros, and 24 bits for int32_t offset
duckdb_time_tz_struct
duckdb_timestamp
! TIMESTAMP values are stored as microseconds since 1970-01-01. ! Use the duckdb_from_timestamp and duckdb_to_timestamp functions to extract individual information.
duckdb_timestamp_ms
! TIMESTAMP_MS values are stored as milliseconds since 1970-01-01.
duckdb_timestamp_ns
! TIMESTAMP_NS values are stored as nanoseconds since 1970-01-01.
duckdb_timestamp_s
! TIMESTAMP_S values are stored as seconds since 1970-01-01.
duckdb_timestamp_struct
duckdb_uhugeint
duckdb_varint
! VARINTs are composed of a byte pointer, a size, and an is_negative bool. ! The absolute value of the number is stored in data in little endian format. ! You must free data with duckdb_free.

Enums§

ErrorCode
Error Codes

Constants§

DUCKDB_TYPE_DUCKDB_TYPE_ANY
DUCKDB_TYPE_DUCKDB_TYPE_ARRAY
DUCKDB_TYPE_DUCKDB_TYPE_BIGINT
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_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_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_VARINT
DuckDBError
DuckDBSuccess
duckdb_cast_mode_DUCKDB_CAST_NORMAL
duckdb_cast_mode_DUCKDB_CAST_TRY
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_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_DuckDBError
duckdb_state_DuckDBSuccess
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_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_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_VACUUM
duckdb_statement_type_DUCKDB_STATEMENT_TYPE_VARIABLE_SET

Functions§

code_to_str
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_row is required.
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 to obtain the error message 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_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
Returns the error message associated with the given appender. If the appender has no error message, this returns nullptr instead.
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 to obtain the error message 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 a array vector.
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. 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.
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 an duckdb_uhugeint value to the prepared statement at the specified index.
duckdb_bind_uint8
Binds an uint8_t value to the prepared statement at the specified index.
duckdb_bind_uint16
Binds an uint16_t value to the prepared statement at the specified index.
duckdb_bind_uint32
Binds an uint32_t value to the prepared statement at the specified index.
duckdb_bind_uint64
Binds an 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_clear_bindings
Clear the params bind to the prepared statement.
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_open or duckdb_open_ext. Note that failing to call duckdb_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_chunk instead.
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_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_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 with duckdb_destroy_value.
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_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_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 a int8_t (a tinyint)
duckdb_create_int16
Creates a value from a int16_t (a smallint)
duckdb_create_int32
Creates a value from a 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 with duckdb_destroy_value.
duckdb_create_logical_type
Creates a duckdb_logical_type from a primitive type. The resulting logical type must be destroyed with duckdb_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_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_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_execution is called on the state.
duckdb_create_time
Creates a value from a time
duckdb_create_time_tz
Create a duckdb_time_tz object 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_uuid
Creates a UUID value from a uhugeint
duckdb_create_varchar
Creates a value from a null-terminated string
duckdb_create_varchar_length
Creates a value from a string
duckdb_create_varint
Creates a VARINT value from a duckdb_varint
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_validity and duckdb_vector_get_data to obtain current data and validity pointers
duckdb_data_chunk_set_size
Sets the current number of tuples in a data chunk.
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_DECIMAL column) 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_stream
DEPRECATION NOTICE**: This method is scheduled for removal in a future release.
duckdb_destroy_cast_function
Destroys the cast function object.
duckdb_destroy_config
Destroys the specified configuration object and de-allocates all memory allocated for the object.
duckdb_destroy_data_chunk
Destroys the data chunk and de-allocates all memory allocated for that chunk.
duckdb_destroy_extracted
De-allocates all memory allocated for the extracted statements. @param extracted_statements The extracted statements to destroy.
duckdb_destroy_instance_cache
Destroys an existing database instance cache and de-allocates its memory.
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 connection.
duckdb_destroy_scalar_function
Destroys the given scalar function object.
duckdb_destroy_scalar_function_set
Destroys the given scalar function set object.
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_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_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_extract_statements
Extract all statements from a query. Note that after calling duckdb_extract_statements, the extracted statements should always be destroyed using duckdb_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_extracted is called.
duckdb_fetch_chunk
Fetches a data chunk from a duckdb_result. This function should be called repeatedly until the result is exhausted.
duckdb_finish_execution
Finish execution on a specific task.
duckdb_free
Free a value returned from duckdb_malloc, duckdb_value_varchar, duckdb_value_blob, or duckdb_value_string.
duckdb_from_date
Decompose a duckdb_date object into year, month and date (stored as duckdb_date_struct).
duckdb_from_time
Decompose a duckdb_time object into hour, minute, second and microsecond (stored as duckdb_time_struct).
duckdb_from_time_tz
Decompose a TIME_TZ objects into micros and a timezone offset.
duckdb_from_timestamp
Decompose a duckdb_timestamp object into a duckdb_timestamp_struct.
duckdb_function_get_bind_data
Gets the bind data set by duckdb_bind_set_bind_data during the bind.
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_data during the init.
duckdb_function_get_local_init_data
Gets the thread-local init data set by duckdb_init_set_init_data during the local_init.
duckdb_function_set_error
Report that an error has occurred while executing the function.
duckdb_get_bit
Returns the duckdb_bit value of the given value. The data field must be destroyed with duckdb_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 index is 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_time
Returns the time 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_type of a duckdb_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_get_varint
Returns the duckdb_varint value of the given value. The data field must be destroyed with duckdb_free.
duckdb_hugeint_to_double
Converts a duckdb_hugeint object (as obtained from a DUCKDB_TYPE_HUGEINT column) into a double.
duckdb_init_get_bind_data
Gets the bind data set by duckdb_bind_set_bind_data during 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_date to see if it is a finite value.
duckdb_is_finite_timestamp
Test a duckdb_timestamp to see if it is a finite value.
duckdb_is_finite_timestamp_ms
Test a duckdb_timestamp_ms to see if it is a finite value.
duckdb_is_finite_timestamp_ns
Test a duckdb_timestamp_ns to see if it is a finite value.
duckdb_is_finite_timestamp_s
Test a duckdb_timestamp_s to 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 total capacity of the underlying child-vector of a list.
duckdb_list_vector_set_size
Sets the total size of the underlying child-vector of a list vector.
duckdb_logical_type_get_alias
Returns the alias of a duckdb_logical_type, if set, else nullptr. The result must be destroyed with duckdb_free.
duckdb_logical_type_set_alias
Sets the alias of a duckdb_logical_type.
duckdb_malloc
Allocate size bytes of memory using the duckdb internal malloc function. Any memory allocated in this manner should be freed using duckdb_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_chunk instead.
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_state is 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 nullptr instead.
duckdb_prepare_extracted_statement
Prepare an extracted statement. Note that after calling duckdb_prepare_extracted_statement, the prepared statement should always be destroyed using duckdb_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_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 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_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_query returns DuckDBError.
duckdb_result_error_type
Returns the result error type contained within the result. The error is only set if duckdb_query returns DuckDBError.
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_get_extra_info
Retrieves the extra info of the function as set in duckdb_scalar_function_set_extra_info.
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_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 parameters of the given scalar function to varargs. Does not require adding parameters with duckdb_scalar_function_add_parameter.
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_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_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.
duckdb_table_description_create
Creates a table description object. Note that duckdb_table_description_destroy should always be called on the resulting table_description, even if the function returns DuckDBError.
duckdb_table_description_create_ext
Creates a table description object. Note that duckdb_table_description_destroy must be called on the resulting table_description, even if the function returns DuckDBError.
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 nullptr instead. The error message should not be freed. It will be de-allocated when duckdb_table_description_destroy is called.
duckdb_table_description_get_column_name
Obtain the column name at ‘index’. The out result must be destroyed with duckdb_free.
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_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_date
Re-compose a duckdb_date from year, month and date (duckdb_date_struct).
duckdb_to_time
Re-compose a duckdb_time from hour, minute, second and microsecond (duckdb_time_struct).
duckdb_to_timestamp
Re-compose a duckdb_timestamp from a duckdb_timestamp_struct.
duckdb_uhugeint_to_double
Converts a duckdb_uhugeint object (as obtained from a DUCKDB_TYPE_UHUGEINT column) 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_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
DEPRECATED**: Use duckdb_value_string_internal instead. This function does not work correctly if the string contains null bytes. @return The char* value at the specified location. ONLY works on VARCHAR columns and does not auto-cast. If the column is NOT a VARCHAR column this function will return NULL.
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_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
DEPRECATED**: Use duckdb_value_string instead. This function does not work correctly if the string contains null bytes.
duckdb_value_varchar_internal
DEPRECATED**: Use duckdb_value_string_internal instead. This function does not work correctly if the string contains null bytes.
duckdb_vector_assign_string_element
Assigns a string element in the vector at the specified location.
duckdb_vector_assign_string_element_len
Assigns a string element in the vector at the specified location. You may also use this function to assign BLOBs.
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_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.
duckdb_aggregate_combine_t
! Combine aggregate states
duckdb_aggregate_destroy_t
! Destroy aggregate state (optional)
duckdb_aggregate_finalize_t
! 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
! Initialize the aggregate state
duckdb_aggregate_state
! Aggregate state
duckdb_aggregate_state_size
! Returns the aggregate state size
duckdb_aggregate_update_t
! 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 ArrowArray object.
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 the 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
duckdb_cast_mode
! An enum over DuckDB’s different cast modes.
duckdb_config
! Can be used to provide start-up options for the DuckDB instance. ! Must be destroyed with duckdb_destroy_config.
duckdb_connection
! A connection to a duckdb database. Must be closed with duckdb_disconnect.
duckdb_create_type_info
! Holds extra information used when registering a custom logical type. ! Reserved for future use.
duckdb_data_chunk
! Contains a data chunk from 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 that will be called to destroy data, e.g., ! bind data (if any), init data (if any), extra data for replacement scans (if any)
duckdb_error_type
! An enum over DuckDB’s different result types.
duckdb_extension_info
! Holds state during the C API extension intialization process
duckdb_extracted_statements
! Extracted statements. Must be destroyed with duckdb_destroy_extracted.
duckdb_function_info
! Additional function info. When setting this info, it is necessary to pass a destroy-callback function.
duckdb_init_info
! Additional function init 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_logical_type
! Holds an internal 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 that matches the query plan.
duckdb_replacement_callback_t
! A replacement scan function that can be added to a database.
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_set
! A scalar function set. Must be destroyed with duckdb_destroy_scalar_function_set.
duckdb_scalar_function_t
! The main function of the scalar function.
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 info 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) init function of the table function.
duckdb_table_function_t
! The main function of the table function.
duckdb_task_state
! Used for threading, contains a task state. Must be destroyed with duckdb_destroy_state.
duckdb_type
! An enum over DuckDB’s internal types. ! An enum over DuckDB’s internal types.
duckdb_value
! Holds a DuckDB value, which wraps a type. ! Must be destroyed with duckdb_destroy_value.
duckdb_vector
! A vector to a specified column in a data chunk. Lives as long as the ! data chunk lives, i.e., must not be destroyed.
idx_t
! DuckDB’s index type.

Unions§

duckdb_string_t__bindgen_ty_1