Example #1
0
    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)
Example #2
0
    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"])
Example #3
0
    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)
Example #4
0
    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)
Example #5
0
    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)