Skip to content

Commit

Permalink
Fix column escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubknejzlik committed Feb 7, 2024
1 parent 7d9fd7b commit a75f090
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/flavors/mysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ export class MySQLFlavor implements ISQLFlavor {
`${this.columnQuotes}${this.columnQuotes}`
)
.split(".")
.join("`.`")}${this.columnQuotes}`;
.join(`${this.columnQuotes}.${this.columnQuotes}`)}${
this.columnQuotes
}`;
}
return `${name}`;
}
return `${this.columnQuotes}${name.split(".").join("`.`")}${
this.columnQuotes
}`;
return `${this.columnQuotes}${name
.split(".")
.join(`${this.columnQuotes}.${this.columnQuotes}`)}${this.columnQuotes}`;
}

escapeTable(table: string): string {
Expand Down

0 comments on commit a75f090

Please sign in to comment.