refactor: make public the code that needs to be exposed, remove unused code

This commit is contained in:
Namu
2026-04-02 00:22:43 +02:00
parent ef0767f33a
commit 27e6193b8d
10 changed files with 231 additions and 68 deletions

View File

@@ -71,16 +71,16 @@ impl ColumnBuilder {
return Err("Cannot set AUTO_INCREMENT on non-INTEGER column".to_string());
}
Ok(Column::new(
self.name,
self.datatype,
self.nullable,
self.default,
self.auto_increment,
self.unique,
self.check_constraint,
self.primary_key,
))
Ok(Column {
name: self.name,
datatype: self.datatype,
nullable: self.nullable,
default: self.default,
auto_increment: self.auto_increment,
unique: self.unique,
check_constraint: self.check_constraint,
primary_key: self.primary_key,
})
}
}
@@ -115,7 +115,7 @@ impl TableBuilder {
}
pub fn build(self) -> Table {
Table::new(self.name, self.columns, self.strict)
Table { name: self.name, columns: self.columns, strict: self.strict }
}
}