Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

214
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda