fix bug with ILIKE/LIKE on UTF8 encoded field

This commit is contained in:
Oliver Gorwits
2023-03-08 22:52:13 +00:00
parent 137f84e0f9
commit 91e783e96f

View File

@@ -43,11 +43,11 @@ Can match the C<type> field as a substring.
=item model
Can match the C<model> field as a substring.
Can match the C<model> field as a substring (case sensitive).
=item serial
Can match the C<serial> field as a substring.
Can match the C<serial> field as a substring (case sensitive).
=item class
@@ -86,11 +86,11 @@ sub search_by_field {
: ()
),
( $p->{model}
? ( 'me.model' => { '-ilike' => "\%$p->{model}\%" } )
? ( 'me.model' => { '-like' => "\%$p->{model}\%" } )
: ()
),
( $p->{serial}
? ( 'me.serial' => { '-ilike' => "\%$p->{serial}\%" } )
? ( 'me.serial' => { '-like' => "\%$p->{serial}\%" } )
: ()
),