Skip to content

Conversation

@jsievenpiper
Copy link
Contributor

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, but eq works, for example). However, anything based on LIKE style queries (starts with, etc) take String inputs. If pulling the string from a sea_orm::Value::to_string call, you'll end up with a double-quoted string:

SELECT ... FROM ... WHERE "table"."column" LIKE "'cheese%'"

Which then fails to actually match anything.

  • Dependencies:
    N/A
  • Dependents:
    N/A

New Features

N/A

Bug Fixes

  • fixes LIKE and NOT LIKE queries when using string inputs.

Breaking Changes

N/A

Changes

N/A

@karatakis
Copy link
Collaborator

Fantastic work, @jsievenpiper, thanks for showing interest in the project and improving it.

@karatakis
Copy link
Collaborator

@jsievenpiper regarding the broken tests I am trying to deal with it at #161

@tyt2y3 tyt2y3 force-pushed the main branch 2 times, most recently from 2de933f to d24a975 Compare August 27, 2025 08:48
@tyt2y3 tyt2y3 force-pushed the main branch 16 times, most recently from 5801629 to f19754c Compare September 6, 2025 21:18
@tyt2y3 tyt2y3 force-pushed the main branch 7 times, most recently from 4e9008c to ff350b4 Compare September 20, 2025 14:37
@tyt2y3 tyt2y3 force-pushed the main branch 2 times, most recently from a33e7eb to 7bced3d Compare September 21, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants