add support for MAX as a character length (#1038)

This commit is contained in:
Ophir LOJKINE 2023-11-10 21:57:56 +01:00 committed by GitHub
parent 4cdaa40abe
commit ff8312bfd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 63 additions and 39 deletions

View file

@ -349,10 +349,12 @@ fn parse_create_table_with_defaults() {
},
ColumnDef {
name: "first_name".into(),
data_type: DataType::CharacterVarying(Some(CharacterLength {
length: 45,
unit: None
})),
data_type: DataType::CharacterVarying(Some(
CharacterLength::IntegerLength {
length: 45,
unit: None
}
)),
collation: None,
options: vec![ColumnOptionDef {
name: None,
@ -361,10 +363,12 @@ fn parse_create_table_with_defaults() {
},
ColumnDef {
name: "last_name".into(),
data_type: DataType::CharacterVarying(Some(CharacterLength {
length: 45,
unit: None
})),
data_type: DataType::CharacterVarying(Some(
CharacterLength::IntegerLength {
length: 45,
unit: None
}
)),
collation: Some(ObjectName(vec![Ident::with_quote('"', "es_ES")])),
options: vec![ColumnOptionDef {
name: None,
@ -373,10 +377,12 @@ fn parse_create_table_with_defaults() {
},
ColumnDef {
name: "email".into(),
data_type: DataType::CharacterVarying(Some(CharacterLength {
length: 50,
unit: None
})),
data_type: DataType::CharacterVarying(Some(
CharacterLength::IntegerLength {
length: 50,
unit: None
}
)),
collation: None,
options: vec![],
},