From 6b29d97f43bdebe87cbe88a066dce45d665f1bf4 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Fri, 26 Oct 2018 23:51:04 -0500 Subject: [PATCH] __init_table__ called on __init__ --- searcher.py | 1 + 1 file changed, 1 insertion(+) diff --git a/searcher.py b/searcher.py index 5dddaba..9608a31 100644 --- a/searcher.py +++ b/searcher.py @@ -11,6 +11,7 @@ class Searcher: self.cur = ext_database.cursor() self.ext = ext self.index = '{}_index'.format(ext) + self.__init_table__() def __init_table__(self): self.cur.execute('CREATE TABLE IF NOT EXISTS ? (`name` TEXT,`fullpath` TEXT,UNIQUE(name,fullpath));',[self.ext]) self.cur.execute('CREATE INDEX IF NOT EXISTS ? ON ? ( `name`, `fullpath` )',[self.index,self.ext])