feophantlib/engine/objects/
constraints.rs1use super::Index;
2use std::{
3 fmt::{self, Display, Formatter},
4 sync::Arc,
5};
6
7mod parse_constraint;
8
9#[derive(Clone, Debug, PartialEq)]
10pub enum Constraint {
11 PrimaryKey(PrimaryKeyConstraint),
12}
13
14#[derive(Clone, Debug, PartialEq)]
18pub enum ConstraintMapper {
19 PrimaryKey,
20}
21
22impl Display for ConstraintMapper {
23 fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
24 write!(f, "PrimaryKey")
25 }
26}
27
28#[derive(Clone, Debug, PartialEq)]
29pub struct PrimaryKeyConstraint {
30 pub name: String,
31 pub index: Arc<Index>,
32}