©️
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

FindIn

Exactly the same functionality as findBy, but search for entities in an interval of values. The return is an array of the entity.

const propertyName = { id : 'id' };
const baseData = [3, 4, 6, 7, 8, 9];
const select = { name: true }

const exampleArray = await this.examplesRepository.findIn(
  {
    where: { id: [3, 4, 6, 7, 8, 9] },
    relations: ["relation-1", "relation-2"], // or { "relation-1": true, "relation-2": true }
    order: { id: 'ASC' },
    select,
  },
  trx,
);

// Find all and select name where id in = "3, 4, 6, 7, 8, 9"

output: [exampleArray]

PreviousFindByNextFindLike

Was this helpful?