Book.save_to_database(session, tables, initializers=None, mapdicts=None, auto_commit=True)

Save data in sheets to database tables

  • session – database session
  • tables – a list of database tables, that is accepted by Sheet.save_to_database(). The sequence of tables matters when there is dependencies in between the tables. For example, Car is made by Car Maker. Car Maker table should be specified before Car table.
  • initializers – a list of intialization functions for your tables and the sequence should match tables,
  • mapdicts – custom map dictionary for your data columns and the sequence should match tables
  • auto_commit – by default, data is committed.