quack_rs/types/mod.rs
1// SPDX-License-Identifier: MIT
2// Copyright 2026 Tom F. <https://github.com/tomtom215/>
3// My way of giving something small back to the open source community
4// and encouraging more Rust development!
5
6//! `DuckDB` type system wrappers.
7//!
8//! This module provides ergonomic wrappers for `DuckDB`'s type system:
9//!
10//! - [`TypeId`]: An enum of all supported `DuckDB` column types
11//! - [`LogicalType`]: An RAII wrapper around `duckdb_logical_type` that ensures
12//! the type is properly destroyed when it goes out of scope
13//!
14//! # Pitfall L7: `LogicalType` memory leak
15//!
16//! `duckdb_create_logical_type` allocates memory that must be freed with
17//! `duckdb_destroy_logical_type`. Failing to call the destructor leaks memory.
18//! [`LogicalType`] solves this by implementing `Drop`.
19
20pub mod logical_type;
21pub mod null_handling;
22pub mod type_id;
23
24pub use logical_type::{LogicalType, LogicalTypeError};
25pub use null_handling::NullHandling;
26pub use type_id::TypeId;