LukasZahradnik / deep-db-learning

A modular message-passing scheme reflecting the relational model for end-to-end deep learning from databases
https://lukaszahradnik.github.io/deep-db-learning/
6 stars 2 forks source link

Can use Connection instead of Session #8

Closed neumannjan closed 1 year ago

neumannjan commented 1 year ago

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 or CREATE), transactions must be used, otherwise the changes won't publish.