2# +==== BEGIN CatFeeder =================+
5# ...............)..(.')
7# ...............\(__)|
8# Inspired by Joan Stark
9# source https://www.asciiart.eu/
13# FILE: sql_constants.py
14# CREATION DATE: 11-10-2025
15# LAST Modified: 14:52:9 19-12-2025
17# This is the backend server in charge of making the actual website work.
19# COPYRIGHT: (c) Cat Feeder
20# PURPOSE: File in charge of storing information that is required for the sql library, but is constant.
22# +==== END CatFeeder =================+
26from typing
import List, Dict
29TARGET: Dict[str, bool] = {
35 "microsoft sql server":
False
44RISKY_KEYWORDS: List[str] = [
45 'add',
'all',
'alter',
'analyze',
'as',
'asc',
'asensitive',
'before',
46 'bigint',
'binary',
'blob',
'by',
'call',
'cascade',
'case',
'change',
'char',
47 'character',
'check',
'collate',
'column',
'condition',
'constraint',
'continue',
48 'convert',
'create',
'cross',
'cursor',
'database',
'databases',
'day_hour',
49 'day_microsecond',
'day_minute',
'day_second',
'dec',
'decimal',
'declare',
'default',
50 'delayed',
'delete',
'desc',
'describe',
'deterministic',
'distinctrow',
'div',
'double',
'drop',
51 'dual',
'each',
'else',
'elseif',
'exit',
'explain',
52 'fetch',
'float',
'for',
'foreign',
'from',
'fulltext',
'general',
53 'grant',
'group',
'high_priority',
'hour_microsecond',
'hour_minute',
54 'hour_second',
'if',
'ignore',
'index',
'infile',
'inner',
'inout',
55 'insensitive',
'insert',
'int',
'integer',
'interval',
'into',
'iterate',
56 'key',
'keys',
'kill',
'leave',
'left',
'linear',
'lines',
57 'load',
'localtime',
'localtimestamp',
'lock',
'long',
'longblob',
'longtext',
'loop',
58 'low_priority',
'master_ssl_verify_server_cert',
'match',
'maxvalue',
'mediumblob',
59 'mediumint',
'mediumtext',
'middleint',
'minute_microsecond',
'minute_second',
60 'modifies',
'natural',
'no_write_to_binlog',
'numeric',
'on',
'optimize',
61 'option',
'optionally',
'order',
'out',
'outer',
'outfile',
'precision',
'primary',
62 'procedure',
'purge',
'range',
'read',
'reads',
'read_write',
'real',
'references',
63 'release',
'rename',
'repeat',
'replace',
'require',
'resignal',
'restrict',
64 'return',
'revoke',
'right',
'schema',
'schemas',
'second_microsecond',
65 'select',
'sensitive',
'separator',
'set',
'show',
'signal',
'smallint',
'spatial',
66 'specific',
'sql',
'sqlexception',
'sqlstate',
'sqlwarning',
'sql_big_result',
67 'sql_calc_found_rows',
'sql_small_result',
'ssl',
'straight_join',
68 'table',
'then',
'tinyblob',
'tinyint',
'tinytext',
'to',
69 'trigger',
'undo',
'unique',
'unlock',
'update',
'usage',
70 'use',
'using',
'values',
'varbinary',
'varchar',
'varcharacter',
71 'when',
'where',
'while',
'with',
'write',
'year_month'
75KEYWORD_LOGIC_GATES: List[str] = [
76 'and',
'or',
'not',
'xor',
'between',
'in',
'is',
'like',
'regexp',
'rlike',
78 'true',
'false',
'exists',
79 'distinct',
'limit',
'having',
'join',
'union',
'current_date',
'current_time',
'current_timestamp',
'utc_date',
80 'utc_time',
'utc_timestamp',
'mod',
'if'
84DATE_ONLY: str =
'%Y-%m-%d'
85DATE_AND_TIME: str =
'%Y-%m-%d %H:%M:%S'
88CONNECTION_FAILED: str =
"Connection to the database is non-existent, aborting command."
89CURSOR_FAILED: str =
"Cursor to the database is non-existent, aborting command."
92GET_TABLE_SIZE_ERROR: int = -1
95SQL_RISKY_DDL_TRIGGER_KEYWORDS: List[str] = [
96 "drop ",
"alter ",
"truncate ",
"create database",
97 "use ",
"grant ",
"revoke ",
"load data",
"outfile",
"infile"