I'm trying to use json-sql npm module with postgres. But I was not able to even do select.
I think, the problem is that query from json-sql contains $p1 instead $1. What I need to tune to be able to get postgres-like query from json-sql?
I tried to use { dialect : 'postgresql' } configuration option but still I have a problem.
As a result of code below:
let userCompSql = jsonSql.build({
type: 'select',
fields: ['id'],
table: 'user_computers',
condition: {
'os_name' : params.osName,
'os_minor' : params.osVersionMinor
}})
I get a string userCompSql: "select "id" from "user_computers" where "os_name" = $p1 and "os_minor" = 0;" But I would like to have $1 instead of $p1 for my postgresql DB.