duckdb_dart library

Dart client for DuckDb

Classes

Bindings
Auto-generated, internal Dart bindings to DuckDb
Config
Configuration options to change the different settings of the database. Many of these settings can be changed later using PRAGMA statements as well. See https://duckdb.org/docs/configuration/overview
Connection
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_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
! Timestamps are stored as microseconds since 1970-01-01 ! Use the duckdb_from_timestamp/duckdb_to_timestamp function to extract individual information
duckdb_timestamp_struct
duckdb_uhugeint
max_align_t
UnnamedStruct1
UnnamedStruct2
UnnamedUnion1

Enums

AccessMode
DefaultNullOrder
DefaultOrder
duckdb_cast_mode
! An enum over DuckDB's different cast modes.
duckdb_error_type
! An enum over DuckDB's different result types.
duckdb_pending_state
! An enum over the pending state of a pending query result.
duckdb_result_type
! An enum over DuckDB's different result types.
duckdb_state
! An enum over the returned state of different functions.
duckdb_statement_type
! An enum over DuckDB's different statement types.
DUCKDB_TYPE
! An enum over DuckDB's internal types.

Constants

false1 → const int
INT16_MAX → const int
INT16_MIN → const int
INT32_MAX → const int
INT32_MIN → const int
INT64_MAX → const int
INT64_MIN → const int
INT8_MAX → const int
INT8_MIN → const int
INT_FAST16_MAX → const int
INT_FAST16_MIN → const int
INT_FAST32_MAX → const int
INT_FAST32_MIN → const int
INT_FAST64_MAX → const int
INT_FAST64_MIN → const int
INT_FAST8_MAX → const int
INT_FAST8_MIN → const int
INT_LEAST16_MAX → const int
INT_LEAST16_MIN → const int
INT_LEAST32_MAX → const int
INT_LEAST32_MIN → const int
INT_LEAST64_MAX → const int
INT_LEAST64_MIN → const int
INT_LEAST8_MAX → const int
INT_LEAST8_MIN → const int
INTMAX_MAX → const int
INTMAX_MIN → const int
INTPTR_MAX → const int
INTPTR_MIN → const int
NULL → const int
PTRDIFF_MAX → const int
PTRDIFF_MIN → const int
SIG_ATOMIC_MAX → const int
SIG_ATOMIC_MIN → const int
SIZE_MAX → const int
true1 → const int
UINT16_MAX → const int
UINT32_MAX → const int
UINT64_MAX → const int
UINT8_MAX → const int
UINT_FAST16_MAX → const int
UINT_FAST32_MAX → const int
UINT_FAST64_MAX → const int
UINT_FAST8_MAX → const int
UINT_LEAST16_MAX → const int
UINT_LEAST32_MAX → const int
UINT_LEAST64_MAX → const int
UINT_LEAST8_MAX → const int
UINTMAX_MAX → const int
UINTPTR_MAX → const int
WCHAR_MAX → const int
WCHAR_MIN → const int
WINT_MAX → const int
WINT_MIN → const int

Properties

bindings Bindings
no setter

Functions

open() DynamicLibrary

Typedefs

Dartduckdb_aggregate_combine_tFunction = void Function(duckdb_function_info info, Pointer<duckdb_aggregate_state> source, Pointer<duckdb_aggregate_state> target, Dartidx_t count)
Dartduckdb_aggregate_destroy_tFunction = void Function(Pointer<duckdb_aggregate_state> states, Dartidx_t count)
Dartduckdb_aggregate_finalize_tFunction = void Function(duckdb_function_info info, Pointer<duckdb_aggregate_state> source, duckdb_vector result, Dartidx_t count, Dartidx_t offset)
Dartduckdb_aggregate_init_tFunction = void Function(duckdb_function_info info, duckdb_aggregate_state state)
Dartduckdb_aggregate_state_sizeFunction = Dartidx_t Function(duckdb_function_info info)
Dartduckdb_aggregate_update_tFunction = void Function(duckdb_function_info info, duckdb_data_chunk input, Pointer<duckdb_aggregate_state> states)
Dartduckdb_cast_function_tFunction = bool Function(duckdb_function_info info, Dartidx_t count, duckdb_vector input, duckdb_vector output)
Dartduckdb_delete_callback_tFunction = void Function(Pointer<Void> data)
Dartduckdb_replacement_callback_tFunction = void Function(duckdb_replacement_scan_info info, Pointer<Char> table_name, Pointer<Void> data)
Dartduckdb_scalar_function_tFunction = void Function(duckdb_function_info info, duckdb_data_chunk input, duckdb_vector output)
Dartduckdb_table_function_bind_tFunction = void Function(duckdb_bind_info info)
Dartduckdb_table_function_init_tFunction = void Function(duckdb_init_info info)
Dartduckdb_table_function_tFunction = void Function(duckdb_function_info info, duckdb_data_chunk output)
Dartidx_t = int
duckdb_aggregate_combine_t = Pointer<NativeFunction<duckdb_aggregate_combine_tFunction>>
! Combine aggregate states
duckdb_aggregate_combine_tFunction = Void Function(duckdb_function_info info, Pointer<duckdb_aggregate_state> source, Pointer<duckdb_aggregate_state> target, idx_t count)
duckdb_aggregate_destroy_t = Pointer<NativeFunction<duckdb_aggregate_destroy_tFunction>>
! Destroy aggregate state (optional)
duckdb_aggregate_destroy_tFunction = Void Function(Pointer<duckdb_aggregate_state> states, idx_t count)
duckdb_aggregate_finalize_t = Pointer<NativeFunction<duckdb_aggregate_finalize_tFunction>>
! Finalize aggregate states into a result vector
duckdb_aggregate_finalize_tFunction = Void Function(duckdb_function_info info, Pointer<duckdb_aggregate_state> source, duckdb_vector result, idx_t count, idx_t offset)
duckdb_aggregate_function = Pointer<_duckdb_aggregate_function>
! An aggregate function. Must be destroyed with duckdb_destroy_aggregate_function.
duckdb_aggregate_function_set = Pointer<_duckdb_aggregate_function_set>
! A aggregate function set. Must be destroyed with duckdb_destroy_aggregate_function_set.
duckdb_aggregate_init_t = Pointer<NativeFunction<duckdb_aggregate_init_tFunction>>
! Initialize the aggregate state
duckdb_aggregate_init_tFunction = Void Function(duckdb_function_info info, duckdb_aggregate_state state)
duckdb_aggregate_state = Pointer<_duckdb_aggregate_state>
! Aggregate state
duckdb_aggregate_state_size = Pointer<NativeFunction<duckdb_aggregate_state_sizeFunction>>
! Returns the aggregate state size
duckdb_aggregate_state_sizeFunction = idx_t Function(duckdb_function_info info)
duckdb_aggregate_update_t = Pointer<NativeFunction<duckdb_aggregate_update_tFunction>>
! Update a set of aggregate states with new values
duckdb_aggregate_update_tFunction = Void Function(duckdb_function_info info, duckdb_data_chunk input, Pointer<duckdb_aggregate_state> states)
duckdb_appender = Pointer<_duckdb_appender>
! The appender enables fast data loading into DuckDB. ! Must be destroyed with duckdb_appender_destroy.
duckdb_arrow = Pointer<_duckdb_arrow>
! Holds an arrow query result. Must be destroyed with duckdb_destroy_arrow.
duckdb_arrow_array = Pointer<_duckdb_arrow_array>
! Holds an arrow array. Remember to release the respective ArrowArray object.
duckdb_arrow_schema = Pointer<_duckdb_arrow_schema>
! Holds an arrow schema. Remember to release the respective ArrowSchema object.
duckdb_arrow_stream = Pointer<_duckdb_arrow_stream>
! Holds an arrow array stream. Must be destroyed with duckdb_destroy_arrow_stream.
duckdb_bind_info = Pointer<_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 = Pointer<_duckdb_cast_function>
! A cast function. Must be destroyed with duckdb_destroy_cast_function.
duckdb_cast_function_t = Pointer<NativeFunction<duckdb_cast_function_tFunction>>
duckdb_cast_function_tFunction = Bool Function(duckdb_function_info info, idx_t count, duckdb_vector input, duckdb_vector output)
duckdb_config = Pointer<_duckdb_config>
! Can be used to provide start-up options for the DuckDB instance. ! Must be destroyed with duckdb_destroy_config.
duckdb_connection = Pointer<_duckdb_connection>
! A connection to a duckdb database. Must be closed with duckdb_disconnect.
duckdb_create_type_info = Pointer<_duckdb_create_type_info>
! Holds extra information used when registering a custom logical type. ! Reserved for future use.
duckdb_data_chunk = Pointer<_duckdb_data_chunk>
! Contains a data chunk from a duckdb_result. ! Must be destroyed with duckdb_destroy_data_chunk.
duckdb_database = Pointer<_duckdb_database>
! A database object. Should be closed with duckdb_close.
duckdb_delete_callback_t = Pointer<NativeFunction<duckdb_delete_callback_tFunction>>
! 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_delete_callback_tFunction = Void Function(Pointer<Void> data)
duckdb_extension_info = Pointer<_duckdb_extension_info>
! Holds state during the C API extension intialization process
duckdb_extracted_statements = Pointer<_duckdb_extracted_statements>
! Extracted statements. Must be destroyed with duckdb_destroy_extracted.
duckdb_function_info = Pointer<_duckdb_function_info>
! Additional function info. When setting this info, it is necessary to pass a destroy-callback function.
duckdb_init_info = Pointer<_duckdb_init_info>
! Additional function init info. When setting this info, it is necessary to pass a destroy-callback function.
duckdb_logical_type = Pointer<_duckdb_logical_type>
! Holds an internal logical type. ! Must be destroyed with duckdb_destroy_logical_type.
duckdb_pending_result = Pointer<_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 = Pointer<_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 = Pointer<_duckdb_profiling_info>
! Holds a recursive tree that matches the query plan.
duckdb_replacement_callback_t = Pointer<NativeFunction<duckdb_replacement_callback_tFunction>>
! A replacement scan function that can be added to a database.
duckdb_replacement_callback_tFunction = Void Function(duckdb_replacement_scan_info info, Pointer<Char> table_name, Pointer<Void> data)
duckdb_replacement_scan_info = Pointer<_duckdb_replacement_scan_info>
! Additional replacement scan info. When setting this info, it is necessary to pass a destroy-callback function.
duckdb_scalar_function = Pointer<_duckdb_scalar_function>
! A scalar function. Must be destroyed with duckdb_destroy_scalar_function.
duckdb_scalar_function_set = Pointer<_duckdb_scalar_function_set>
! A scalar function set. Must be destroyed with duckdb_destroy_scalar_function_set.
duckdb_scalar_function_t = Pointer<NativeFunction<duckdb_scalar_function_tFunction>>
! The main function of the scalar function.
duckdb_scalar_function_tFunction = Void Function(duckdb_function_info info, duckdb_data_chunk input, duckdb_vector output)
duckdb_table_description = Pointer<_duckdb_table_description>
! The table description allows querying info about the table. ! Must be destroyed with duckdb_table_description_destroy.
duckdb_table_function = Pointer<_duckdb_table_function>
! A table function. Must be destroyed with duckdb_destroy_table_function.
duckdb_table_function_bind_t = Pointer<NativeFunction<duckdb_table_function_bind_tFunction>>
! The bind function of the table function.
duckdb_table_function_bind_tFunction = Void Function(duckdb_bind_info info)
duckdb_table_function_init_t = Pointer<NativeFunction<duckdb_table_function_init_tFunction>>
! The (possibly thread-local) init function of the table function.
duckdb_table_function_init_tFunction = Void Function(duckdb_init_info info)
duckdb_table_function_t = Pointer<NativeFunction<duckdb_table_function_tFunction>>
! The main function of the table function.
duckdb_table_function_tFunction = Void Function(duckdb_function_info info, duckdb_data_chunk output)
duckdb_task_state = Pointer<Void>
! Used for threading, contains a task state. Must be destroyed with duckdb_destroy_state.
duckdb_value = Pointer<_duckdb_value>
! Holds a DuckDB value, which wraps a type. ! Must be destroyed with duckdb_destroy_value.
duckdb_vector = Pointer<_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 = Uint64
! DuckDB's index type.