Ff00ff/mammoth

Bug: leftJoin produces the wrong SQL

Closed this issue · 2 comments

Here's the source code:

mammoth/src/select.ts

Lines 230 to 237 in 144b464

leftJoin<JoinTable extends Table<any, any>>(
table: JoinTable,
): LeftJoin<SelectQuery<Columns, IncludesStar>, JoinTable> {
return this.newSelectQuery(
[...this.tokens, new StringToken(`INNER JOIN`), this.getTableStringToken(table)],
table,
) as any;
}

Looks like leftJoin produces an INNER JOIN. The correct thing should be a LEFT JOIN, right?

Thanks this was just merged.

This is also released in 1.3 now.