Skip to content

Instantly share code, notes, and snippets.

@joemalski
joemalski / sqldebugger.py
Last active June 8, 2020 23:36
Flask SqlAlchemy Debugger
'''
Flask SqlAlchemy Debugger (Python 3)
------------------------------------
Shows the actual "sql query equivalent" of Flask-SQLAlchemy for debugging purposes
and gives you a rough estimation of where in your application query was issued.
Only runs when you enable "FLASK_ENV=development", since this will automatically set the
"FLASK_DEBUG=1" or explicitly set "FLASK_DEBUG=1". If you are in "FLASK_ENV=testing" (testing mode)
or "FLASK_ENV=production" and you want to make it work without enabling the debugging mode,
@joemalski
joemalski / mysql_table_opts_datatypes.txt
Last active August 14, 2020 23:43
MySql Table Options and Data Types
Table Options:
--------------
ENGINE - A database engine (or storage engine) is the underlying software
component that a database management system (DBMS) uses to create,
read, update and delete (CRUD) data from a database.
InnoDB vs MyISAM
----------------