Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/mysql/writer/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ impl ColumnInfo {
};
col_def = self.write_num_attr(col_def, num_attr);
}
Type::MediumInt(_) => {
// FIXME: Unresolved type mapping
col_def.custom(self.col_type.clone());
Type::MediumInt(num_attr) => {
match num_attr.unsigned {
Some(_) => col_def.unsigned(),
None => col_def.integer(),
};
col_def = self.write_num_attr(col_def, num_attr);
}
Type::Int(num_attr) => {
match num_attr.unsigned {
Expand Down Expand Up @@ -169,8 +172,9 @@ impl ColumnInfo {
col_def = self.write_str_attr(col_def, str_attr);
}
Type::TinyText(_) => {
// FIXME: Unresolved type mapping
col_def.custom(self.col_type.clone());
// map to varchar(255)
col_def.string_len(255);
col_def.extra(format!("CHARACTER SET {}", CharSet::Utf8.to_string()));
}
Type::MediumText(_) => {
// FIXME: Unresolved type mapping
Expand Down