コード例 #1
0
        private static DataResponse CreateResponseSchemeForSelect(RequestExecutionContext context)
        {
            var parsedRequest = context.ParsedRequest;
            var fields        = new DataResponseField[parsedRequest.Select.OutputColumns.Count];
            var ordinal       = 0;

            foreach (var clause in parsedRequest.Select.OutputColumns)
            {
                fields[ordinal] = new DataResponseField
                {
                    DataType    = clause.DbType,
                    DisplayName = parsedRequest.Select.OutputColumns[ordinal].Label,
                    Name        = parsedRequest.Select.OutputColumns[ordinal].Label,
                    Ordinal     = ordinal
                };
                ordinal++;
            }

            return(new DataResponse(fields));
        }
コード例 #2
0
ファイル: DataEngine.cs プロジェクト: adrobyazko-softheme/PQL
        private static DataResponse CreateResponseSchemeForSelect(RequestExecutionContext context)
        {
            var parsedRequest = context.ParsedRequest;
            var fields = new DataResponseField[parsedRequest.Select.OutputColumns.Count];
            var ordinal = 0;
            foreach (var clause in parsedRequest.Select.OutputColumns)
            {
                fields[ordinal] = new DataResponseField
                {
                    DataType = clause.DbType,
                    DisplayName = parsedRequest.Select.OutputColumns[ordinal].Label,
                    Name = parsedRequest.Select.OutputColumns[ordinal].Label,
                    Ordinal = ordinal
                };
                ordinal++;
            }

            return new DataResponse(fields);
        }