cargo fmt
This commit is contained in:
parent
b566ea6e12
commit
f6672137a2
@ -128,7 +128,9 @@ impl Column {
|
||||
}
|
||||
ColumnType::Time(_) => quote! { ColumnType::Time.def() },
|
||||
ColumnType::Date => quote! { ColumnType::Date.def() },
|
||||
ColumnType::Binary(BlobSize::Blob(_)) | ColumnType::VarBinary(_) => quote! { ColumnType::Binary.def() },
|
||||
ColumnType::Binary(BlobSize::Blob(_)) | ColumnType::VarBinary(_) => {
|
||||
quote! { ColumnType::Binary.def() }
|
||||
}
|
||||
ColumnType::Binary(BlobSize::Tiny) => quote! { ColumnType::TinyBinary.def() },
|
||||
ColumnType::Binary(BlobSize::Medium) => quote! { ColumnType::MediumBinary.def() },
|
||||
ColumnType::Binary(BlobSize::Long) => quote! { ColumnType::LongBinary.def() },
|
||||
@ -466,14 +468,20 @@ mod tests {
|
||||
#[test]
|
||||
fn test_get_info() {
|
||||
let column: Column = ColumnDef::new(Alias::new("id")).string().to_owned().into();
|
||||
assert_eq!(column.get_info(&DateTimeCrate::Chrono).as_str(), "Column `id`: Option<String>");
|
||||
assert_eq!(
|
||||
column.get_info(&DateTimeCrate::Chrono).as_str(),
|
||||
"Column `id`: Option<String>"
|
||||
);
|
||||
|
||||
let column: Column = ColumnDef::new(Alias::new("id"))
|
||||
.string()
|
||||
.not_null()
|
||||
.to_owned()
|
||||
.into();
|
||||
assert_eq!(column.get_info(&DateTimeCrate::Chrono).as_str(), "Column `id`: String, not_null");
|
||||
assert_eq!(
|
||||
column.get_info(&DateTimeCrate::Chrono).as_str(),
|
||||
"Column `id`: String, not_null"
|
||||
);
|
||||
|
||||
let column: Column = ColumnDef::new(Alias::new("id"))
|
||||
.string()
|
||||
|
Loading…
x
Reference in New Issue
Block a user