Skip to content

Commit

Permalink
add back quote to parseColumn
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Mar 3, 2024
1 parent 4b8152d commit 8dc278f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/parseSchema.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ test("parseColumn", () => {
expect(parseColumn("timestamp INTEGER")).toBe("timestamp");
expect(parseColumn("\"timestamp\" INTEGER")).toBe("timestamp");
expect(parseColumn("'timestamp' INTEGER")).toBe("timestamp");
expect(parseColumn("`timestamp` INTEGER")).toBe("timestamp");

// empty columns
expect(parseColumn(");")).toBe("");
Expand Down
2 changes: 1 addition & 1 deletion src/parseSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ export function parseColumn(statement: string) {
// remove quotes
export function preParseStatement(statement: string) {
return statement
.replace(/[,;\'\"]/g, '')
.replace(/[,;\'\"`]/g, '')
.trim()
}

0 comments on commit 8dc278f

Please sign in to comment.