Skip to content

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

@haoynmail

Description

@haoynmail

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions