Add support of NVARCHAR data type (#462)

* Add support of nvarchar data type

* Change the format type with capitals

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* Add Test

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
This commit is contained in:
yuval-illumex 2022-04-21 00:25:50 +03:00 committed by GitHub
parent d035784bdf
commit 278345d21a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 0 deletions

View file

@ -2569,6 +2569,7 @@ impl<'a> Parser<'a> {
}
}
Keyword::VARCHAR => Ok(DataType::Varchar(self.parse_optional_precision()?)),
Keyword::NVARCHAR => Ok(DataType::Nvarchar(self.parse_optional_precision()?)),
Keyword::CHAR | Keyword::CHARACTER => {
if self.parse_keyword(Keyword::VARYING) {
Ok(DataType::Varchar(self.parse_optional_precision()?))