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

178
Views
How to use wildcard characters in ts TypeORM?

I'm coding a query in my NestTs project, so I would like to retrieve information matched with LIKE clause values.

The problem with my query is the table has three types of records _INFORMED, _UNINFORMED and WITHOUT. If I use the sentence

.where("user.firstName like :name", { name:`%_INFORMED%` })

... It matches with _INFORMED and _UNINFORMED records, then I tried to use the wildcard character as to standard SQL: '%\\_INFORMED%' but it looks wrong.

Do you have any idea? Thanks!

Edit:

Full TYPEORM query:

.createQueryBuilder(Stage, 's')
  .innerJoin('s.stageType', 'st')
  .leftJoin('s.reasons', 'r')
  .select(['s.id', 's.description', 's.name', 'st.id', 'st.name', 'st.displayName', 'r.id', 'r.code', 'r.description'])
  .where('st.name like :INFORMED', {
    INFORMED: '%\\INFORMED',
  })
  .orWhere('st.id = :eMeliKeyword', {
    eMeliKeyword: StageTypesID.DE_MELI_KEYWORD_ID,
  })
  .getMany();
about 4 years ago · Juan Pablo Isaza
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!