mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Implemented JSON valid function
This commit is contained in:
parent
359576d910
commit
0903b9b019
6 changed files with 66 additions and 4 deletions
|
@ -79,6 +79,7 @@ pub enum JsonFunc {
|
|||
JsonObject,
|
||||
JsonType,
|
||||
JsonErrorPosition,
|
||||
JsonValid,
|
||||
}
|
||||
|
||||
#[cfg(feature = "json")]
|
||||
|
@ -97,6 +98,7 @@ impl Display for JsonFunc {
|
|||
Self::JsonObject => "json_object".to_string(),
|
||||
Self::JsonType => "json_type".to_string(),
|
||||
Self::JsonErrorPosition => "json_error_position".to_string(),
|
||||
Self::JsonValid => "json_valid".to_string(),
|
||||
}
|
||||
)
|
||||
}
|
||||
|
@ -519,6 +521,8 @@ impl Func {
|
|||
"json_type" => Ok(Func::Json(JsonFunc::JsonType)),
|
||||
#[cfg(feature = "json")]
|
||||
"json_error_position" => Ok(Self::Json(JsonFunc::JsonErrorPosition)),
|
||||
#[cfg(feature = "json")]
|
||||
"json_valid" => Ok(Self::Json(JsonFunc::JsonValid)),
|
||||
"unixepoch" => Ok(Self::Scalar(ScalarFunc::UnixEpoch)),
|
||||
"julianday" => Ok(Self::Scalar(ScalarFunc::JulianDay)),
|
||||
"hex" => Ok(Self::Scalar(ScalarFunc::Hex)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue