from .db import Author, Book, Extension, Genre, Language, \
insert_name, insert_author
from .db import Author, Book, Extension, Genre, Language, \
insert_name, insert_author
for name in inpx.namelist():
archive, ext = os.path.splitext(name)
if ext != '.inp':
continue
for name in inpx.namelist():
archive, ext = os.path.splitext(name)
if ext != '.inp':
continue
inp = inpx.open(name)
sqlhub.doInTransaction(import_inp, archive + '.zip', inp)
inp.close()
connection = sqlhub.processConnection
inp = inpx.open(name)
sqlhub.doInTransaction(import_inp, archive + '.zip', inp)
inp.close()
connection = sqlhub.processConnection
for table in Author, Book, Extension, Genre, Language:
connection.query("VACUUM %s" % table.sqlmeta.table)
for table in Author, Book, Extension, Genre, Language:
connection.query("VACUUM %s" % table.sqlmeta.table)