Fix LIKE and NOT LIKE Queries for Strings #162
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Info
This is a quick patch that fixes LIKE and NOT LIKE queries, which as far as I can tell, have never worked in seaography. The underlying
sea_orm
code works, but when stringifying the already String value, sea_orm quotes the value (presumably to prevent SQL injection?).In other query filters, the filter conditions take a
sea_orm::Value
directly, which seems to do the correct thing (I didn't look that deeply at it, buteq
works, for example). However, anything based onLIKE
style queries (starts with, etc) takeString
inputs. If pulling the string from asea_orm::Value::to_string
call, you'll end up with a double-quoted string:Which then fails to actually match anything.
N/A
N/A
New Features
N/A
Bug Fixes
Breaking Changes
N/A
Changes
N/A