value.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:fluiddb 作者: fluidinfo 项目源码 文件源码
def _resolveQuery(self, session, objects, query):
        """Resolve a L{Query}.

        @param session: The L{FluidinfoSession} for the request.
        @param objects: The L{SecureObjectAPI} to use to fetch object IDs.
        @param query: The L{Query} to resolve.
        @return: A C{list} of object ID C{str}s that match the query.
        """
        try:
            result = objects.search([query])
        except UnknownPathError as error:
            session.log.exception(error)
            unknownPath = error.paths[0]
            raise TNonexistentTag(unknownPath.encode('utf-8'))
        except PermissionDeniedError as error:
            session.log.exception(error)
            deniedPath, operation = error.pathsAndOperations[0]
            raise TNonexistentTag(deniedPath)

        try:
            with session.timer.track('index-search'):
                result = blockingCallFromThread(reactor, result.get)
        except SearchError as error:
            session.log.exception(error)
            raise TParseError(query, error.message)

        return result[query]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号