1 unstable release
0.1.0 | Feb 3, 2025 |
---|
#833 in Database interfaces
131 downloads per month
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.