Skip to main content

Module types

Module types 

Source
Expand description

DuckDB type system wrappers.

This module provides ergonomic wrappers for DuckDB’s type system:

  • TypeId: An enum of all supported DuckDB column types
  • LogicalType: An RAII wrapper around duckdb_logical_type that ensures the type is properly destroyed when it goes out of scope

§Pitfall L7: LogicalType memory leak

duckdb_create_logical_type allocates memory that must be freed with duckdb_destroy_logical_type. Failing to call the destructor leaks memory. LogicalType solves this by implementing Drop.

Re-exports§

pub use logical_type::LogicalType;
pub use logical_type::LogicalTypeError;
pub use null_handling::NullHandling;
pub use type_id::TypeId;

Modules§

logical_type
RAII wrapper for duckdb_logical_type.
null_handling
NULL propagation behaviour for DuckDB functions.
type_id
Ergonomic enum of all DuckDB column types.