forwardemail / forwardemail/json-sql-enhanced

[fix] join:[{type:'right' ...}] can not right join, but join

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## 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";

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.