code: def update_main_table(self):
          
          data = (json.dumps(self.settings),)
          self.cursor.execute('''
              CREATE TABLE IF NOT EXISTS main (
                  settings TEXT NOT NULL DEFAULT "{}"
              )
          ''')
          self.cursor.execute('SELECT * FROM main')
          if self.cursor.fetchall() == []:
              self.cursor.execute('INSERT INTO main (settings) VALUES (?)', data)
          else:
              self.cursor.execute('UPDATE main SET settings=?', data)
docs: Write generator settings to database.