Describe the bug
Node.js version: <22.12>
OS version: window11.
Description: json-sql-enhanced version: 3.0.0: join [{type:'right'}] can not right join, but join
Actual behavior
var sql = jsonSql.build({
table: 'table',
join: [
{
type: 'right',
table: 'joinTable',
on: { 'table.a': 'joinTable.b' },
},
],
});
### sql.query;
//query: 'select * from "table" join "joinTable" on "table.a" = $p1',
// values: { p1: 'joinTable.b' },
Expected behavior
sql.query;
// select * from "table" right join "joinTable" on "table"."a" = "joinTable"."b";
Describe the bug
Node.js version: <22.12>
OS version: window11.
Description: json-sql-enhanced version: 3.0.0: join [{type:'right'}] can not right join, but join
Actual behavior
var sql = jsonSql.build({
table: 'table',
join: [
{
type: 'right',
table: 'joinTable',
on: { 'table.a': 'joinTable.b' },
},
],
});
### sql.query;
//query: 'select * from "table" join "joinTable" on "table.a" = $p1',
// values: { p1: 'joinTable.b' },
Expected behavior
sql.query;
// select * from "table" right join "joinTable" on "table"."a" = "joinTable"."b";