0
I’m having trouble executing a select in Nodejs where it takes quite long looking that the same stays in infinite loop.
module - sequelizejs bd - SQL server
dbConnection
const Sequelize = require('sequelize');
var teste = new Sequelize('bd_name', 'user_name', 'password', {
host: 'ip_server',
dialect: 'mssql'
});
}
teste.authenticate()
.then(()=>{
console.log('Conexão estabelecida com sucesso.');
})
.catch(err=>{
console.error('Erro na conexão com o banco de dados:', err);
});
module.exports = function() {
return teste;
}
Formulary
function FormulasDAO(connection) {
this._connection = connection;
}
FormulasDAO.prototype.getFormulas = function(callback){
this._connection.query('select * from USUARIO', callback);
}
module.exports = function() {
return FormulasDAO;
}
What size of your table
USUARIO
? If it has many rows and columns it may be that thequery
be really slow– Sorack
@Sorack has exactly 280 records
– Bruno Ferreira