adelsz / pgtyped

pgTyped - Typesafe SQL in TypeScript
https://pgtyped.dev
MIT License
2.91k stars 94 forks source link

LIKE query #539

Closed jetjtx closed 11 months ago

jetjtx commented 1 year ago

How does the placeholder use in the LIKE query?

title LIKE '%:title%'

adelsz commented 11 months ago

Postgres doesn't support parameters inside literals like that. What you can do is title LIKE :title where :title can be %test%: