fix: NUMBER type name
This commit is contained in:
parent
6000b1f242
commit
677fd19bec
1 changed files with 2 additions and 2 deletions
|
|
@ -32,12 +32,12 @@ pub fn parse_column_name(input: &str) -> IResult<&str, String> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_db_type(input: &str) -> IResult<&str, DbType> {
|
pub fn parse_db_type(input: &str) -> IResult<&str, DbType> {
|
||||||
let (input, type_name) = alt((tag("STRING"), tag("INT"), tag("Float"), tag("UUID")))(input)?;
|
let (input, type_name) = alt((tag("STRING"), tag("INT"), tag("NUMBER"), tag("UUID")))(input)?;
|
||||||
let db_type = match type_name {
|
let db_type = match type_name {
|
||||||
"STRING" => DbType::String,
|
"STRING" => DbType::String,
|
||||||
"INT" => DbType::Int,
|
"INT" => DbType::Int,
|
||||||
"UUID" => DbType::Uuid,
|
"UUID" => DbType::Uuid,
|
||||||
"Float" => DbType::Number,
|
"NUMBER" => DbType::Number,
|
||||||
_ => return Err(nom::Err::Failure(make_error(input, nom::error::ErrorKind::IsNot)))
|
_ => return Err(nom::Err::Failure(make_error(input, nom::error::ErrorKind::IsNot)))
|
||||||
};
|
};
|
||||||
Ok((input, db_type))
|
Ok((input, db_type))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue