refactor: make public the code that needs to be exposed, remove unused code
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user