':param filename: filename for database (without extension)
:param table_name: table name
:param fast_save: If it\'s True, then sqlite will be configured with
`"PRAGMA synchronous = 0;" <http://www.sqlite.org/pragma.html#pragma_synchronous>`_
to speedup cache saving, but be careful, it\'s dangerous.
Tests showed that insertion order of records can be wrong with this option.'

def __init__(self, filename, table_name='data', fast_save=False, **options):

    self.filename = filename
    self.table_name = table_name
    self.fast_save = fast_save
    self.can_commit = True
    self._bulk_commit = False
    self._pending_connection = None
    self._lock = threading.RLock()
    with self.connection() as con:
        con.execute(('create    table    if    not    exists    `%s`    (key    PRIMARY    KEY,    value)' % self.table_name))
