def __init__(self, db_filename, signature, commit_periodicity=1,
               exporter=None):
    self.complete = False
    create_table = ('create table result (\n'
                    'id BLOB primary key,\n'
                    'value BLOB not null,\n'
                    'sort_key BLOB)')

    _Database.__init__(self,
                       db_filename,
                       create_table,
                       signature,
                       commit_periodicity=commit_periodicity)
    if self.existing_table:
      cursor = self.primary_conn.cursor()
      cursor.execute('select count(*) from result')
      self.existing_count = int(cursor.fetchone()[0])
    else:
      self.existing_count = 0
    self.count = self.existing_count
    if exporter and getattr(exporter, 'calculate_sort_key_from_entity', False):
      self.sort_key_from_entity = exporter.sort_key_from_entity
    else:
      self.sort_key_from_entity = None
Initialize a ResultDatabase object.
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/bulkloader.py/ResultDatabase.__init__