Skip to content

Commit

Permalink
chore: implement Uuid comparison in query.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
JimFuller-RedHat committed Oct 14, 2024
1 parent b685e38 commit 4c3063c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/src/db/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use std::sync::OnceLock;
use time::format_description::well_known::Rfc3339;
use time::macros::format_description;
use time::{Date, OffsetDateTime};
use uuid::Uuid;

/////////////////////////////////////////////////////////////////////////
// Public interface
Expand Down Expand Up @@ -473,6 +474,7 @@ impl Arg {
return Ok(Arg::Null);
}
Ok(match ct {
ColumnType::Uuid => Arg::Value(Value::from(s.parse::<Uuid>().map_err(err)?)),
ColumnType::Integer => Arg::Value(Value::from(s.parse::<i32>().map_err(err)?)),
ColumnType::Decimal(_) | ColumnType::Float | ColumnType::Double => {
Arg::Value(Value::from(s.parse::<f64>().map_err(err)?))
Expand Down

0 comments on commit 4c3063c

Please sign in to comment.