What is the design pattern in SQLalchemy and how does it work?
-
I wonder how defining each column as class variable in a child class of db.Model provides necessary information to create table. How does db.create_all get these data?
-
We usually don't explicitly define init for the table, however we can use the initializer. How this is done?
-
Why this design has been used? Is it because class variables are initiated when the interpreter reaches the definition, while there can be many instances?
Aucun commentaire:
Enregistrer un commentaire