temboard icon indicating copy to clipboard operation
temboard copied to clipboard

use anosql or an adhoc sql file loader

Open dlax opened this issue 4 years ago • 2 comments

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.

dlax avatar Mar 04 '20 09:03 dlax

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

dlax avatar Mar 03 '22 14:03 dlax

Yes, like alembic does not worth it for UI.

bersace avatar Mar 03 '22 16:03 bersace

Done. https://github.com/dalibo/temboard/blob/master/ui/temboardui/toolkit/queries.py

bersace avatar Oct 17 '22 14:10 bersace