FindLike
Exatamente a mesma funcionalidade que findBy, mas procura entidades usando a cláusula Like. O retorno é uma matriz da entidade.
const where = { name: '%example%' };
const select = { name: true, id: true };
const order = { name: 'ASC' } // opções = "ASC" | "DESC" | "asc" | "desc"
const limit = 10
const exampleArray = await this.examplesRepository.findLike(
{
where,
order,
select,
limit
}
trx,
);
// Busca todos e seleciona name onde name possui 'example'
output: [exampleArray]
Was this helpful?