-connection = xsetbg_db._connection
-
-connection.query("PRAGMA synchronous=OFF")
-connection.query("PRAGMA count_changes=OFF")
-connection.query("PRAGMA journal_mode=MEMORY")
-connection.query("PRAGMA temp_store=MEMORY")
-
-txn = connection.transaction()
-sqlhub.processConnection = txn
-
-for line in dump_file:
- id, timestamp, filename = line.strip().split(None, 2)
- id = convert_str(id)
- timestamp = convert_str(timestamp)
- if fs_encoding != 'utf-8':
- filename = filename.decode(fs_encoding).encode('utf-8')
- values = {'last_shown': timestamp, 'full_name': filename}
- if id:
- values['id'] = id
- query = txn.sqlrepr(Insert(XSetBg.sqlmeta.table, values=values))
- txn.query(query)