I just figured out that we will pretty much never need SQLAlchemy's Session - instead we should stick to the Connection, as the only difference is ORM, which we don't use.
Also, when using Connection on write SQL statements (such as UPDATE or CREATE), transactions must be used, otherwise the changes won't publish.
https://github.com/LukasZahradnik/deep-db-learning/blob/a52d83dcb086377e46cc9346466c7ad3a8f04b3f/db_transformer/db/schema_autodetect.py#L107
https://github.com/LukasZahradnik/deep-db-learning/blob/a52d83dcb086377e46cc9346466c7ad3a8f04b3f/db_transformer/helpers/database.py#L11
I just figured out that we will pretty much never need SQLAlchemy's Session - instead we should stick to the Connection, as the only difference is ORM, which we don't use.
Also, when using Connection on write SQL statements (such as
UPDATE
orCREATE
), transactions must be used, otherwise the changes won't publish.