kermit_ds/
relation_builder.rs1use {
2 crate::relation::Relation,
3 csv::Error,
4 std::{fmt::Debug, path::Path, str::FromStr},
5};
6
7pub trait RelationBuilder<KT, R>
8where
9 KT: PartialOrd + PartialEq + Clone + FromStr + Debug,
10 R: Relation<KT>,
11{
12 fn new(cardinality: usize) -> Self;
13 fn build(self) -> R;
14 fn add_tuple(self, tuple: Vec<KT>) -> Self;
15 fn add_tuples(self, tuple: Vec<Vec<KT>>) -> Self;
16 fn add_file<P: AsRef<Path>>(self, filepath: P) -> Result<Self, Error>
17 where
18 Self: Sized;
19}