Skip to main content

Crate better_duck_core

Crate better_duck_core 

Source
Expand description

better-duck-core — a safe, low-level Rust wrapper around the DuckDB C API (libduckdb-sys).

This crate provides:

Re-exports§

pub extern crate libduckdb_sys;

Re-exports§

pub use asynchronous::AsyncConnection;
pub use asynchronous::AsyncDatabase;
pub use asynchronous::AsyncPool;
pub use config::AccessMode;
pub use config::Config;
pub use config::DefaultNullOrder;
pub use config::DefaultOrder;
pub use database::Database;
pub use result_set::ResultSet;
pub use types::appendable::AppendAble;
pub use libduckdb_sys as ffi;

Modules§

asynchronous
Async facade over connection::Connection, gated by the async feature. Async facade over Connection, gated by the async feature.
config
DuckDB database configuration.
connection
High-level DuckDB connection type.
database
A shared, cloneable handle to an open DuckDB database.
error
Error types returned by this crate.
pool
An r2d2 connection pool backed by a shared Database. An r2d2 connection pool backed by a shared Database.
result_set
An owned, thread-safe, fully materialized query result.
types
DuckDB type system and value conversion traits.
udf
User-defined DuckDB functions: scalar functions and table functions. User-defined DuckDB functions: scalar functions and table functions.

Macros§

duck_bail
Returns early from a fallible user-defined-function body with a formatted error message.
impl_appendable_via_to_duck_native
Implements AppendAble for a type that already implements crate::types::DuckDialect by going through the duckdb_value path: to_duck()duckdb_bind_value / duckdb_append_valueduckdb_destroy_value.

Structs§

Appender
A DuckDB appender for bulk-inserting rows into a table. A DuckDB appender for bulk-inserting rows into a table without going through the SQL parser.
CachedStatement
A prepared statement suitable for caching and re-execution. A prepared statement that can be reset and re-executed with different bindings.
DuckResult
A fully iterable DuckDB query result. Represents the result of a DuckDB query, providing row-by-row iteration over the returned data.
DuckRow
A single row from a DuckDB query result. A single row of data returned by a DuckDB query, consisting of typed values and their associated column names.

Attribute Macros§

duckdb_scalar
Registers a plain Rust function as a DuckDB scalar function. See udf. Registers a plain Rust function as a DuckDB scalar function.
duckdb_table_function
Registers a plain Rust function as a DuckDB table function. See udf. Registers a plain Rust function as a DuckDB table function.