Exemplo n.º 1
0
        private IMessage PerformQueryAll(IMessage request)
        {
            ISpace ts = this.repository.GetSpace(request.Target);

            if (ts != null)
            {
                QueryAllRequest      getReq = (QueryAllRequest)request;
                IEnumerable <ITuple> tuples = ts.QueryAll(new Pattern(getReq.Template));
                return(new QueryAllResponse(request.Source, request.Session, request.Target, tuples?.Select(x => x.Fields) ?? null, StatusCode.OK, StatusMessage.OK));
            }
            return(new QueryAllResponse(request.Source, request.Session, request.Target, null, StatusCode.NOT_FOUND, StatusMessage.NOT_FOUND));
        }