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

158
Views
¿Cómo usar SIMILAR TO o Posix en Knex para Postgres?

Postgres admite expresiones regulares SIMILAR TO y POSIX , lo que permite escribir expresiones regulares más potentes que el operador LIKE . https://www.postgresql.org/docs/7.3/functions-matching.html

Estoy usando Knex para ejecutar consultas en una base de datos de Postgres. Sé cómo usar LIKE con knex pero no pude encontrar el soporte para expresiones regulares SIMILAR TO o POSIX.

¿Cómo puedo usar SIMILAR TO con knex o incluso mejor las expresiones POSIX?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Encontré el soporte para POSIX . Parece que el operador SIMILAR TO no es compatible. Sin embargo, eso está bien ya que POSIX permite escribir expresiones regulares más potentes que SIMILAR TO .

 .where('column', '~', 'pattern');

~ : coincidencia sensible a mayúsculas y minúsculas

~* : coincidencia que no distingue entre mayúsculas y minúsculas

!~ y !~* negación del operador correspondiente.

https://github.com/knex/knex/pull/562/files

about 4 years ago · Juan Pablo Isaza Report
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!