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

99
Visualizações
Sequelize asynchronous queries

The terminology used on this question is probably not the most correct one but I hope you get the idea of what I'm asking.

If I have two asynchronous functions fetching and then updating a certain column from a certain row, is it possible for one of them to have fetched the non updated value? Or are the queries made in a way that they await for the other function to update the value before fetching it?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Yes it's possible for both conditions. If you want to fetch column first use and then update column try let row = await model.Rows.findOne(where:condition); let UpdateRow = await row.update(column); in other case try this let updateRow = await model.Rows.update('column'{ where:condition}); let row = await model.Rows.findOne({where:condition]);

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