osirisdb 0.7.0

A SQL database engine built from scratch in Rust featuring a custom parser, binder, query planner, optimizer, catalog, and storage engine.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::{ast::*, common::symbol::Symbol};

/// Represents the definition of a table column (e.g. `username VARCHAR(255) NOT NULL UNIQUE`).
#[derive(Debug, Clone, PartialEq)]
pub struct ColumnDef {
    /// The name of the column.
    pub name: Symbol,
    /// The data type of the column (e.g. `INT`, `VARCHAR(255)`).
    pub data_type: DataType,
    /// Optional collation name (e.g., `COLLATE "fr_FR"`).
    pub collation: Option<Symbol>,
    /// Column-level constraints applied directly to this column (e.g., `NOT NULL`, `DEFAULT 0`).
    pub constraints: Vec<ColumnConstraint>,
    /// Optional generated column metadata (e.g., `GENERATED ALWAYS AS (age * 2) STORED`).
    pub generated: Option<GeneratedColumn>,
}