use super::query::EngineType;
use crate::types_expr::SqlDataType;
#[derive(Debug, Clone)]
pub struct CollectionInfo {
pub name: String,
pub engine: EngineType,
pub columns: Vec<ColumnInfo>,
pub primary_key: Option<String>,
pub has_auto_tier: bool,
pub indexes: Vec<IndexSpec>,
pub bitemporal: bool,
pub primary: nodedb_types::PrimaryEngine,
pub vector_primary: Option<nodedb_types::VectorPrimaryConfig>,
}
#[derive(Debug, Clone)]
pub struct IndexSpec {
pub name: String,
pub field: String,
pub unique: bool,
pub case_insensitive: bool,
pub state: IndexState,
pub predicate: Option<String>,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum IndexState {
Building,
Ready,
}
#[derive(Debug, Clone)]
pub struct ColumnInfo {
pub name: String,
pub data_type: SqlDataType,
pub nullable: bool,
pub is_primary_key: bool,
pub default: Option<String>,
}