Replies: 1 comment 7 replies
-
There is ilike query ilike(table.column, `%${value}%`) |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Edit: I think, the easiest option is to add a custom type
.collate('utf8mb4_bin')
to CREATE TABLE columns which makes that column case sensitive, so the question is how to create such a custom type? Anyone likes to help?My first guess would be something like this (?):
Bonus question, how would this work when inspecting a db? Will COLLATE be recognized?
OG post:
In MySQL most used coalitions are case insensitive (e.g. PlanetScale) but for some use-case like a base64 id you need to have case sensitivity. You can achieve this with raw SQL:
Important is not to put the BINARY before column, otherwise the index is not used, from https://stackoverflow.com/a/38578098
How can I achieve this with Drizzle?
Beta Was this translation helpful? Give feedback.
All reactions