temboard
temboard copied to clipboard
use anosql or an adhoc sql file loader
There is a lot of SQL queries as python strings in the code base. anosql is a nice tool to embed SQL in python code as queries can be written in plain .sql
files with documentation and syntax highlighting. This would improves the readability and testeability.
anosql is probably not needed and we can roll our own .sql
file loader as in https://github.com/dalibo/pg_activity/blob/v2.3.0/pgactivity/queries/init.py
Yes, like alembic does not worth it for UI.
Done. https://github.com/dalibo/temboard/blob/master/ui/temboardui/toolkit/queries.py