'suite_version': Cache(lambda x: '%s_%s' % (x['source'], x['suite'])),
}
+ self.prepared_statements = {}
+
+ def prepare(self,name,statement):
+ if not self.prepared_statements.has_key(name):
+ c = self.cursor()
+ c.execute(statement)
+ self.prepared_statements[name] = statement
+
def clear_caches(self):
self.__init_caches()
@return: the database id for the given suite
"""
- return self.__get_id('id', 'suite', 'suite_name', suite)
+ return int(self.__get_id('id', 'suite', 'suite_name', suite))
def get_section_id(self, section):
"""
for fullpath in fullpaths:
(path, file) = os.path.split(fullpath)
+ if path.startswith( "./" ):
+ path = path[2:]
# Get the necessary IDs ...
file_id = self.get_or_set_contents_file_id(file)
path_id = self.get_or_set_contents_path_id(path)