Remove quotes for defaults that are keywords

This commit is contained in:
1ilit
2024-04-24 12:19:36 +03:00
parent 2751a6d6df
commit 583138949b
2 changed files with 14 additions and 5 deletions

View File

@@ -25,6 +25,12 @@ export function strHasQuotes(str) {
);
}
const keywords = ["CURRENT_TIMESTAMP", "NULL"];
export function isKeyword(str) {
return keywords.includes(str.toUpperCase());
}
export function isFunction(str) {
return /\w+\([^)]*\)$/.test(str);
}