Esempio n. 1
0
        public override void OnSuccess(RpbResp response)
        {
            var             decoder = new ResponseDecoder((TsQueryResp)response);
            DecodedResponse dr      = decoder.Decode();

            Response = new QueryResponse(CommandOptions.Query, dr.Columns, dr.Rows);

            if (CommandOptions.Callback != null)
            {
                CommandOptions.Callback(Response);
            }
            else
            {
                rows.AddRange(Response.Value);
            }

            var streamingResponse = response as IRpbStreamingResp;

            if (streamingResponse != null && streamingResponse.done)
            {
                Response = new QueryResponse(CommandOptions.Query, dr.Columns, rows);
            }
        }