©️
Cross api
En-US
En-US
  • Introduction
  • Compatibility
  • Extensions
  • Usage
    • Tools
      • Config
      • ListProvider
      • Language
      • Help
    • Structure
      • MakeApi
      • MakeModule
      • MakeProvider
      • Revert
  • Structure
    • Root
    • Src
    • @Types
    • Assets
    • Config
    • Dtos
    • Jobs
    • Keys
    • Middlewares
    • Modules
    • Routes
    • Shared
    • Utils
  • Services
    • Transactions
    • Exists
    • FindBy
    • FindIn
    • FindLike
    • FindAll
    • Create
    • CreateMany
    • Update
    • UpdateMany
    • Delete
    • DeleteMany
    • SoftDelete
    • SoftDeleteMany
  • Mappers
    • CloneAttribute
    • UpdateAttribute
    • PatchAttribute
    • UpdateString
    • PatchString
    • InsertAttribute
  • Providers
    • Cache
    • Crypto
    • Hash
    • Lead
    • MailTemplate
    • Mail
    • Queue
    • Notification
    • Storage
Powered by GitBook
On this page

Was this helpful?

  1. Services

FindLike

Exactly the same functionality as findBy, but search for entities using Like clause. The return is an array of the entity.

const where = { name: '%example%' };
const select = { name: true, id: true };
const order = { name: 'ASC' } // options = "ASC" | "DESC" | "asc" | "desc"
const limit = 10

const exampleArray = await this.examplesRepository.findLike(
  {
    where,
    order,
    select,
    limit
  }
  trx,
);

// Find all and select name where name has 'example'

output: [exampleArray]

PreviousFindInNextFindAll

Was this helpful?