Cat Feeder  1.0.0
The Cat feeder project
Loading...
Searching...
No Matches
backend.src.libs.sql.sql_constants Namespace Reference

Variables

dict TARGET
 
list UNWANTED_ARGUMENTS
 
list RISKY_KEYWORDS
 
list KEYWORD_LOGIC_GATES
 
str DATE_ONLY = '%Y-%m-%d'
 
str DATE_AND_TIME = '%Y-%m-%d %H:%M:%S'
 
str CONNECTION_FAILED = "Connection to the database is non-existent, aborting command."
 
str CURSOR_FAILED = "Cursor to the database is non-existent, aborting command."
 
int GET_TABLE_SIZE_ERROR = -1
 
list SQL_RISKY_DDL_TRIGGER_KEYWORDS
 

Detailed Description

# +==== BEGIN CatFeeder =================+
# LOGO:
# ..............(..../\
# ...............)..(.')
# ..............(../..)
# ...............\‍(__)|
# Inspired by Joan Stark
# source https://www.asciiart.eu/
# animals/cats
# /STOP
# PROJECT: CatFeeder
# FILE: sql_constants.py
# CREATION DATE: 11-10-2025
# LAST Modified: 14:52:9 19-12-2025
# DESCRIPTION:
# This is the backend server in charge of making the actual website work.
# /STOP
# COPYRIGHT: (c) Cat Feeder
# PURPOSE: File in charge of storing information that is required for the sql library, but is constant.
# // AR
# +==== END CatFeeder =================+

Variable Documentation

◆ CONNECTION_FAILED

str backend.src.libs.sql.sql_constants.CONNECTION_FAILED = "Connection to the database is non-existent, aborting command."

Definition at line 88 of file sql_constants.py.

◆ CURSOR_FAILED

str backend.src.libs.sql.sql_constants.CURSOR_FAILED = "Cursor to the database is non-existent, aborting command."

Definition at line 89 of file sql_constants.py.

◆ DATE_AND_TIME

str backend.src.libs.sql.sql_constants.DATE_AND_TIME = '%Y-%m-%d %H:%M:%S'

Definition at line 85 of file sql_constants.py.

◆ DATE_ONLY

str backend.src.libs.sql.sql_constants.DATE_ONLY = '%Y-%m-%d'

Definition at line 84 of file sql_constants.py.

◆ GET_TABLE_SIZE_ERROR

int backend.src.libs.sql.sql_constants.GET_TABLE_SIZE_ERROR = -1

Definition at line 92 of file sql_constants.py.

◆ KEYWORD_LOGIC_GATES

list backend.src.libs.sql.sql_constants.KEYWORD_LOGIC_GATES
Initial value:
1= [
2 'and', 'or', 'not', 'xor', 'between', 'in', 'is', 'like', 'regexp', 'rlike',
3 # 'null',
4 'true', 'false', 'exists',
5 'distinct', 'limit', 'having', 'join', 'union', 'current_date', 'current_time', 'current_timestamp', 'utc_date',
6 'utc_time', 'utc_timestamp', 'mod', 'if'
7]

Definition at line 75 of file sql_constants.py.

◆ RISKY_KEYWORDS

list backend.src.libs.sql.sql_constants.RISKY_KEYWORDS
Initial value:
1= [
2 'add', 'all', 'alter', 'analyze', 'as', 'asc', 'asensitive', 'before',
3 'bigint', 'binary', 'blob', 'by', 'call', 'cascade', 'case', 'change', 'char',
4 'character', 'check', 'collate', 'column', 'condition', 'constraint', 'continue',
5 'convert', 'create', 'cross', 'cursor', 'database', 'databases', 'day_hour',
6 'day_microsecond', 'day_minute', 'day_second', 'dec', 'decimal', 'declare', 'default',
7 'delayed', 'delete', 'desc', 'describe', 'deterministic', 'distinctrow', 'div', 'double', 'drop',
8 'dual', 'each', 'else', 'elseif', 'exit', 'explain',
9 'fetch', 'float', 'for', 'foreign', 'from', 'fulltext', 'general',
10 'grant', 'group', 'high_priority', 'hour_microsecond', 'hour_minute',
11 'hour_second', 'if', 'ignore', 'index', 'infile', 'inner', 'inout',
12 'insensitive', 'insert', 'int', 'integer', 'interval', 'into', 'iterate',
13 'key', 'keys', 'kill', 'leave', 'left', 'linear', 'lines',
14 'load', 'localtime', 'localtimestamp', 'lock', 'long', 'longblob', 'longtext', 'loop',
15 'low_priority', 'master_ssl_verify_server_cert', 'match', 'maxvalue', 'mediumblob',
16 'mediumint', 'mediumtext', 'middleint', 'minute_microsecond', 'minute_second',
17 'modifies', 'natural', 'no_write_to_binlog', 'numeric', 'on', 'optimize',
18 'option', 'optionally', 'order', 'out', 'outer', 'outfile', 'precision', 'primary',
19 'procedure', 'purge', 'range', 'read', 'reads', 'read_write', 'real', 'references',
20 'release', 'rename', 'repeat', 'replace', 'require', 'resignal', 'restrict',
21 'return', 'revoke', 'right', 'schema', 'schemas', 'second_microsecond',
22 'select', 'sensitive', 'separator', 'set', 'show', 'signal', 'smallint', 'spatial',
23 'specific', 'sql', 'sqlexception', 'sqlstate', 'sqlwarning', 'sql_big_result',
24 'sql_calc_found_rows', 'sql_small_result', 'ssl', 'straight_join',
25 'table', 'then', 'tinyblob', 'tinyint', 'tinytext', 'to',
26 'trigger', 'undo', 'unique', 'unlock', 'update', 'usage',
27 'use', 'using', 'values', 'varbinary', 'varchar', 'varcharacter',
28 'when', 'where', 'while', 'with', 'write', 'year_month'
29]

Definition at line 44 of file sql_constants.py.

◆ SQL_RISKY_DDL_TRIGGER_KEYWORDS

list backend.src.libs.sql.sql_constants.SQL_RISKY_DDL_TRIGGER_KEYWORDS
Initial value:
1= [
2 "drop ", "alter ", "truncate ", "create database",
3 "use ", "grant ", "revoke ", "load data", "outfile", "infile"
4]

Definition at line 95 of file sql_constants.py.

◆ TARGET

dict backend.src.libs.sql.sql_constants.TARGET
Initial value:
1= {
2 "mysql": True,
3 "mariadb": True,
4 "sqlite": False,
5 "postgresql": False,
6 "sqlexpress": False,
7 "microsoft sql server": False
8}

Definition at line 29 of file sql_constants.py.

◆ UNWANTED_ARGUMENTS

list backend.src.libs.sql.sql_constants.UNWANTED_ARGUMENTS
Initial value:
1= [
2 "option_files"
3]

Definition at line 39 of file sql_constants.py.