duckdb_dart library

Dart client for DuckDb

Classes

ArrowArray
! 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
ArrowSchema
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_bignum
! BIGNUMs 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.
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 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.
duckdb_date
! DATE is stored as days since 1970-01-01. ! Use the duckdb_from_date and duckdb_to_date functions 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_double and duckdb_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_entry struct 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 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 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_time
! TIME is stored as microseconds since 00:00:00. ! Use the duckdb_from_time and duckdb_to_time functions 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_tz function to extract individual information.
duckdb_time_tz_struct
duckdb_timestamp
! TIMESTAMP is 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 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_double and duckdb_double_to_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 error 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

false$ → 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
true$ → 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

Dart__blkcnt64_t = int
Dart__blkcnt_t = int
Dart__blksize_t = int
Dart__clock_t = int
Dart__clockid_t = int
Dart__daddr_t = int
Dart__dev_t = int
Dart__fsblkcnt64_t = int
Dart__fsblkcnt_t = int
Dart__fsfilcnt64_t = int
Dart__fsfilcnt_t = int
Dart__fsword_t = int
Dart__gid_t = int
Dart__id_t = int
Dart__ino64_t = int
Dart__ino_t = int
Dart__int16_t = int
Dart__int32_t = int
Dart__int64_t = int
Dart__int8_t = int
Dart__intmax_t = int
Dart__intptr_t = int
Dart__key_t = int
Dart__mode_t = int
Dart__off64_t = int
Dart__off_t = int
Dart__pid_t = int
Dart__quad_t = int
Dart__rlim64_t = int
Dart__rlim_t = int
Dart__sig_atomic_t = int
Dart__socklen_t = int
Dart__ssize_t = int
Dart__suseconds64_t = int
Dart__suseconds_t = int
Dart__syscall_slong_t = int
Dart__syscall_ulong_t = int
Dart__time_t = int
Dart__u_char = int
Dart__u_int = int
Dart__u_long = int
Dart__u_quad_t = int
Dart__u_short = int
Dart__uid_t = int
Dart__uint16_t = int
Dart__uint32_t = int
Dart__uint64_t = int
Dart__uint8_t = int
Dart__uintmax_t = int
Dart__useconds_t = int
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_bind_tFunction = void Function(duckdb_bind_info info)
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
Dartint_fast16_t = int
Dartint_fast32_t = int
Dartint_fast64_t = int
Dartint_fast8_t = int
Dartptrdiff_t = int
Dartsel_t = int
Dartuint_fast16_t = int
Dartuint_fast32_t = int
Dartuint_fast64_t = int
Dartuint_fast8_t = int
duckdb_aggregate_combine_t = Pointer<NativeFunction<duckdb_aggregate_combine_tFunction>>
! A function to 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>>
! An optional function to destroy an aggregate state.
duckdb_aggregate_destroy_tFunction = Void Function(Pointer<duckdb_aggregate_state> states, idx_t count)
duckdb_aggregate_finalize_t = Pointer<NativeFunction<duckdb_aggregate_finalize_tFunction>>
! A function to 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>>
! A function to initialize an aggregate state.
duckdb_aggregate_init_tFunction = Void Function(duckdb_function_info info, duckdb_aggregate_state state)
duckdb_aggregate_state = Pointer<_duckdb_aggregate_state>
! The state of an aggregate function.
duckdb_aggregate_state_size = Pointer<NativeFunction<duckdb_aggregate_state_sizeFunction>>
! A function to return the aggregate state's size.
duckdb_aggregate_state_sizeFunction = idx_t Function(duckdb_function_info info)
duckdb_aggregate_update_t = Pointer<NativeFunction<duckdb_aggregate_update_tFunction>>
! A function to 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 ArrowSchema object.
duckdb_arrow_converted_schema = Pointer<_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 = Pointer<_duckdb_arrow_options>
! The arrow options used when transforming the DuckDB schema and datachunks into Arrow schema and arrays. ! Used in duckdb_to_arrow_schema and duckdb_data_chunk_to_arrow
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 a 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>>
! The function to cast from an input vector to an output vector.
duckdb_cast_function_tFunction = Bool Function(duckdb_function_info info, idx_t count, duckdb_vector input, duckdb_vector output)
duckdb_client_context = Pointer<_duckdb_client_context>
! A client context of a duckdb connection. Must be destroyed with duckdb_destroy_context.
duckdb_config = Pointer<_duckdb_config>
! The configuration can be used to provide start-up options for a database. ! 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_copy_callback_t = Pointer<NativeFunction<duckdb_copy_callback_tFunction>>
! The callback to copy data, e.g., bind data (if any).
duckdb_copy_callback_tFunction = Pointer<Void> Function(Pointer<Void> data)
duckdb_create_type_info = Pointer<_duckdb_create_type_info>
! Holds extra information to register a custom logical type. ! Reserved for future use.
duckdb_data_chunk = Pointer<_duckdb_data_chunk>
! Contains a data chunk of a duckdb_result. ! Must be destroyed with duckdb_destroy_data_chunk.
duckdb_database = Pointer<_duckdb_database>
! A database object. Must be closed with duckdb_close.
duckdb_delete_callback_t = Pointer<NativeFunction<duckdb_delete_callback_tFunction>>
! The callback to destroy data, e.g., ! bind data (if any), init data (if any), extra data for replacement scans (if any), etc.
duckdb_delete_callback_tFunction = Void Function(Pointer<Void> data)
duckdb_error_data = Pointer<_duckdb_error_data>
! Holds error data. ! Must be destroyed with duckdb_destroy_error_data.
duckdb_expression = Pointer<_duckdb_expression>
! Holds a bound expression. ! Must be destroyed with duckdb_destroy_expression.
duckdb_extension_info = Pointer<_duckdb_extension_info>
! Holds the state of the C API extension initialization 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 initialization info. ! When setting this info, it is necessary to pass a destroy-callback function.
duckdb_instance_cache = Pointer<_duckdb_instance_cache>
! A database instance cache object. Must be destroyed with duckdb_destroy_instance_cache.
duckdb_logical_type = Pointer<_duckdb_logical_type>
! A 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 containing profiling metrics. ! The tree matches the query plan, and has a top-level node.
duckdb_replacement_callback_t = Pointer<NativeFunction<duckdb_replacement_callback_tFunction>>
! A replacement scan function.
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_bind_t = Pointer<NativeFunction<duckdb_scalar_function_bind_tFunction>>
! The bind function callback of the scalar function.
duckdb_scalar_function_bind_tFunction = Void Function(duckdb_bind_info info)
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 function to execute the scalar function on an input chunk.
duckdb_scalar_function_tFunction = Void Function(duckdb_function_info info, duckdb_data_chunk input, duckdb_vector output)
duckdb_selection_vector = Pointer<_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 = Pointer<_duckdb_table_description>
! The table description allows querying information 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 initialization 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 function to generate an output chunk during table function execution.
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_task_state.
duckdb_value = Pointer<_duckdb_value>
! A value of a logical type. ! Must be destroyed with duckdb_destroy_value.
duckdb_vector = Pointer<_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 = Uint64
! DuckDB's index type.
int_fast16_t = Long
int_fast32_t = Long
int_fast64_t = Long
int_fast8_t = SignedChar
int_least16_t = __int_least16_t
int_least32_t = __int_least32_t
int_least64_t = __int_least64_t
int_least8_t = __int_least8_t
intmax_t = __intmax_t
ptrdiff_t = Long
sel_t = Uint32
! Type definition for the data pointers of selection vectors.
uint_fast16_t = UnsignedLong
uint_fast32_t = UnsignedLong
uint_fast64_t = UnsignedLong
uint_fast8_t = UnsignedChar
uint_least16_t = __uint_least16_t
uint_least32_t = __uint_least32_t
uint_least64_t = __uint_least64_t
uint_least8_t = __uint_least8_t
uintmax_t = __uintmax_t