mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
FEAT: Implement the unixepoch function
Signed-off-by: Rajiv Harlalka <rajivharlalka009@gmail.com>
This commit is contained in:
parent
1aa7a7c52c
commit
6684fb46e4
4 changed files with 23 additions and 3 deletions
|
@ -63,6 +63,7 @@ pub enum ScalarFunc {
|
|||
Time,
|
||||
Unicode,
|
||||
Quote,
|
||||
UnixEpoch,
|
||||
}
|
||||
|
||||
impl ToString for ScalarFunc {
|
||||
|
@ -91,6 +92,7 @@ impl ToString for ScalarFunc {
|
|||
ScalarFunc::Time => "time".to_string(),
|
||||
ScalarFunc::Unicode => "unicode".to_string(),
|
||||
ScalarFunc::Quote => "quote".to_string(),
|
||||
ScalarFunc::UnixEpoch => "unixepoch".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,6 +139,7 @@ impl Func {
|
|||
"unicode" => Ok(Func::Scalar(ScalarFunc::Unicode)),
|
||||
"quote" => Ok(Func::Scalar(ScalarFunc::Quote)),
|
||||
"json" => Ok(Func::Json(JsonFunc::JSON)),
|
||||
"unixepoch" => Ok(Func::Scalar(ScalarFunc::UnixEpoch)),
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue