Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

163
Views
How do I search pattern match with knex

I'm searching through an sql database using knex.js query builder and I'm trying to create a model that searches for all rows where the title has the input title I pass.

async function getByTitle(title) {
  const result = await db('recipes')
    .select('*')
    .whereRaw('LOWER(title) LIKE ?', title);
  return result;
}

This seems to only give the exact matches to the title instead of pattern matching it. For example, I have

test
test1
test2
test3

when title is test, I expect to get all that back, but instead I only get test back. I've searched through many similar questions and this seemed to be the solution, but this isn't working in my case.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!