#duck-db #sql-database #sql #rust

xext-duckdb-type

A Rust crate providing a robust and extensible SQL values representation for DuckDB

1 unstable release

0.1.0 Feb 3, 2025

#833 in Database interfaces

Download history 50/week @ 2025-01-28 58/week @ 2025-02-04 23/week @ 2025-02-11

131 downloads per month

MIT license

4KB

xext-duckdb-type

xext-duckdb-type is a Rust crate designed to provide a robust and extensible representation of SQL values typically used in DuckDB databases. The crate defines an enum, SqlValue, which includes various SQL types such as integers, floats, booleans, strings, blobs, dates, and more.

Features

  • Comprehensive support for common SQL types including:
    • Null
    • Integer, SmallInt
    • Float, Double
    • Boolean and Text
    • Date, Time, Timestamp, TimestampTz
    • Interval and Decimal
    • UUID and Enum
  • Easy integration into DuckDB-related projects
  • Lightweight and idiomatic Rust implementation

Installation

Add the following to your Cargo.toml:

[dependencies]
xext-duckdb-type = "0.1.0"

Usage

Import the crate and use the DuckValue enum to represent SQL values:

use xext_duckdb_type::DuckValue;

fn main() {
    let value = DuckValue::Integer(42);
    println!("{:?}", value);
}

License

This project is licensed under the MIT License.

No runtime deps