How does this handle re-establishment of the connection mid-transaction, or, if the user has modified any session variables?
ServeManager and Connection Manager are written in a such way that if any connection is lost except maintenance db connection
then we can re-connect or create new connection without prompting for database password and if maintenance db connection is lost
then It prompts for password.
Right.
Regarding session variables as long as flask session is not expired we uses same session variables. But in case of user logout (due to
flask session expire) we create new transaction id and sets new session variables for that particular Sql editor /datagrid instance.
I mean DB session variables (and related things). For example, if the user executed queries such as the following, then they absolutely need to know if the session got reset:
CREATE TEMPORARY TABLE ....
SET ROLE ...
SET [various other options]
If the user has done any of those things (or similar things that I haven't thought of), then we cannot just blindly reset the database connection.