mirror of
https://github.com/drawdb-io/drawdb.git
synced 2026-02-12 02:00:40 +08:00
Remove quotes for defaults that are keywords
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user