Skip to content

Commit

Permalink
change raw name comparison from eq to like
Browse files Browse the repository at this point in the history
  • Loading branch information
callensm committed Sep 15, 2023
1 parent ff85781 commit 0eae523
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion digital_asset_types/src/dao/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,13 @@ impl SearchAssetsQuery {
}

if let Some(n) = self.name.to_owned() {
let cond = Condition::all().add(asset_data::Column::RawName.eq(n));
let name_as_str = std::str::from_utf8(&n).map_err(|_| {
DbErr::Custom(
"Could not convert raw name bytes into string for comparison".to_owned(),
)
})?;

let cond = Condition::all().add(asset_data::Column::RawName.like(name_as_str));
conditions = conditions.add(cond);
let rel = asset_data::Relation::Asset
.def()
Expand Down

0 comments on commit 0eae523

Please sign in to comment.