-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move config.json to config.ts and add some comments
- Loading branch information
BitterPanda
committed
Feb 27, 2024
1 parent
9de3ded
commit 42aff2f
Showing
3 changed files
with
110 additions
and
98 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
const SQL_KEYWORDS = [ | ||
"INSERT", | ||
"SELECT", | ||
"CREATE", | ||
"DROP", | ||
"DATABASE", | ||
"UPDATE", | ||
"DELETE", | ||
"ALTER", | ||
"GRANT", | ||
"SAVEPOINT", | ||
"COMMIT", | ||
"ROLLBACK", | ||
"TRUNCATE", | ||
"OR", | ||
"AND", | ||
"UNION", | ||
"AS", | ||
"WHERE", | ||
"DISTINCT", | ||
"FROM", | ||
"INTO", | ||
"TOP", | ||
"BETWEEN", | ||
"LIKE", | ||
"IN", | ||
"NULL", | ||
"NOT", | ||
"TABLE", | ||
"INDEX", | ||
"VIEW", | ||
"COUNT", | ||
"SUM", | ||
"AVG", | ||
"MIN", | ||
"MAX", | ||
"GROUP", | ||
"BY", | ||
"HAVING", | ||
"DESC", | ||
"ASC", | ||
"OFFSET", | ||
"FETCH", | ||
"LEFT", | ||
"RIGHT", | ||
"INNER", | ||
"OUTER", | ||
"JOIN", | ||
"EXISTS", | ||
"REVOKE", | ||
"ALL", | ||
"LIMIT", | ||
"ORDER", | ||
"ADD", | ||
"CONSTRAINT", | ||
"COLUMN", | ||
"ANY", | ||
"BACKUP", | ||
"CASE", | ||
"CHECK", | ||
"REPLACE", | ||
"DEFAULT", | ||
"EXEC", | ||
"FOREIGN", | ||
"KEY", | ||
"FULL", | ||
"PROCEDURE", | ||
"ROWNUM", | ||
"SET", | ||
"UNIQUE", | ||
"VALUES", | ||
"COLLATE", | ||
"IS", | ||
]; | ||
|
||
// We make use of double backslashes to create a single backslash in the RegEx | ||
const SQL_OPERATORS = [ | ||
"=", | ||
"!", | ||
";", | ||
"\\+", // This checks for "+" | ||
"\\-", // This checks for "-" | ||
"\\*", // This checks for "*" | ||
"\\/", // This checks for a slash | ||
"%", | ||
"&", | ||
"\\|", // This checks for "|" | ||
"\\^", // This checks for "^" | ||
">", | ||
"<", | ||
]; | ||
|
||
// We make use of double backslashes to create a single backslash in the RegEx | ||
const SQL_DANGEROUS_IN_STRING = [ | ||
"\\\\", // Check for backslashes : "\" | ||
"'", // Check for single quotes | ||
'"', // Check for double quotes | ||
"`", // Check for ` | ||
"\\/\\*", // Check for the start of a comment : "/*" | ||
"--", // Check for the the start of a comment : "--" | ||
]; | ||
const SQL_STRING_CHARS = ['"', "'"]; | ||
|
||
export { | ||
SQL_KEYWORDS, | ||
SQL_OPERATORS, | ||
SQL_DANGEROUS_IN_STRING, | ||
SQL_STRING_CHARS, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters