feat: add time() scalar function partial support without modifier #158

This commit is contained in:
sonhmai 2024-08-01 09:55:38 +07:00
parent ce7f373add
commit 789ae4becf
7 changed files with 408 additions and 19 deletions

View file

@ -41,6 +41,7 @@ pub enum ScalarFunc {
Min,
Max,
Date,
Time,
Unicode,
}
@ -61,6 +62,7 @@ impl ToString for ScalarFunc {
ScalarFunc::Min => "min".to_string(),
ScalarFunc::Max => "max".to_string(),
ScalarFunc::Date => "date".to_string(),
ScalarFunc::Time => "time".to_string(),
ScalarFunc::Unicode => "unicode".to_string(),
}
}
@ -97,6 +99,7 @@ impl Func {
"round" => Ok(Func::Scalar(ScalarFunc::Round)),
"length" => Ok(Func::Scalar(ScalarFunc::Length)),
"date" => Ok(Func::Scalar(ScalarFunc::Date)),
"time" => Ok(Func::Scalar(ScalarFunc::Time)),
"unicode" => Ok(Func::Scalar(ScalarFunc::Unicode)),
_ => Err(()),
}