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

1K
Vistas
NestJS: Case-insensitive search in PostgreSQL

Is there any way to do a case-insensitive search with NestJS in PostgreSQL?

I've succeeded in doing a case-sensitive search:

let result = await myRepository.findOne({firstName: fName, lastName: lName});

I'm trying to change it to a case-insensitive search.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The ILike option should work for that:

import {ILike} from "typeorm";

const loadedPosts = await connection.getRepository(Post).find({
    title: ILike("%out #%")
});

Example from https://typeorm.io/#/find-options/advanced-options


For ILIKE in Postgres see https://www.postgresql.org/docs/current/functions-matching.html#FUNCTIONS-LIKE

The key word ILIKE can be used instead of LIKE to make the match case-insensitive according to the active locale. This is not in the SQL standard but is a PostgreSQL extension.

over 4 years ago · Santiago Trujillo Denunciar
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