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

217
Views
How does ORMs such TypeORM or Sequelize really works?

I would like to understand better how does ORMs works behind the curtains and how is it able to transform commands and functions into queries for relational and non relational databases and why is it safer than just querying directly from database connection in the backend.

I tried searching about it but only found documentation and ways of using ORM itselft rather than what it really does when you use it.-

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

In general, the typeOrm uses something called decorators (Read more about decorators at https://www.typescriptlang.org/docs/handbook/decorators.html ). Basically, they are nothing but a function, which can access the variable information it is annotated with.
E.g.: @Entity(), @PrimaryGeneratedColumn() and @Column() are decorator functions which are provided by TypeOrm library.

So, with the help of this Decorator functions, TypeOrm can generate optimised and secure code for interative with your Database.

SQL injection is very famous type of attack for Servers using SQL database, hence it is very essential to have security while writting the SQL query. You would manually need to sanitise the data, which TypeOrm internally takes care. (Ref: https://dev.to/yoshi_yoshi/typeorm-prevent-sql-injection-with-node-js-react-typescript-in-2021-1go4 )

about 4 years ago · Juan Pablo Isaza Report
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!