def __init__(self): NoteBookConnection.__init__(self) self._filename = None self._index = None self._path_cache = PathCache() self._rootid = None self._index_file = None # attributes to not write to disk, they can be derived self._attr_suppress = set(["parentids", "childrenids"]) self._attr_mask = maskdict.MaskDict({}, self._attr_suppress)
def __init__(self, attr_defs): NoteBookConnection.__init__(self) self._filename = None self._attr_defs = attr_defs self._index = None self._path_cache = PathCache() self._rootid = None self._index_file = None # attributes to not write to disk, they can be derived self._attr_suppress = set(["parentids", "childids"])
def index(self, query): if query[0] == "has_fulltext": return self._index.has_fulltext_search() elif query[0] == "enable_fulltext": return self._index.enable_fulltext_search(query[1]) elif query[0] == "compact": return self._index.compact() else: return NoteBookConnection.index(self, query)