Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda