jade.utils.sql.make_table

jade.utils.sql.make_table(db_file, table, row, primary_key=None)[source]

Create a table in the database based on the types in row.

Parameters:
  • db_file (Path) – Database file. Create if it doesn’t already exist.

  • table (str)

  • row (dict) – Each key will be a column in the table. Define schema by the types of the values.

  • primary_key (str | None) – Column name to define as the primary key