0

I'm facing a problem after to update my sails, postgre adapter and nodejs version

when i try to use sails.sendNativeQuery in my log i receive it: debug: { command: undefined, rowCount: undefined, oid: undefined, rows: undefined }

the same query used in a old postgre and nodejs version is working but when i try to use a new nodejs version it stop to work.

this is my query:

        var sql = `set lc_time = 'pt_BR.UTF-8';
    SELECT count(itinerario.id) as total FROM itinerario
    inner join route on route.id = itinerario.route_id
    WHERE data_agendamento between '${start}' AND '${end}'
    AND itinerario.status = 'Aberto'`
    var total_rotas = await sails.sendNativeQuery(sql);

my postgre adapter version: "sails-postgresql": "^5.0.1",

Sails version: "sails": "^1.2.4",

Node Version: "node": "^18.15"

this same query is working when i use this enviromment: "sails-postgresql": "^1.0.2", "node": "^12.18" Sails version: "sails": "^1.2.4",

If i try to use this old postgre version in a new sails version with a new nodejs version i receive a timeout when i try to start the server too.

any suggestion? thank you guys!

Ademir Gomes
  • 11
  • 1
  • 4

0 Answers0