示例#1
0
        public async Task <QueryResult> QueryAsync(DynamoQuery query)
        {
            var httpRequest = Setup("Query", query.ToJson());

            var json = await SendAndReadJsonElementAsync(httpRequest).ConfigureAwait(false);

            return(QueryResult.FromJsonElement(json));
        }
示例#2
0
        public async Task <CountResult> QueryCountAsync(DynamoQuery query)
        {
            query.Select = SelectEnum.COUNT;

            var httpRequest = Setup("Query", query.ToJson());

            string responseText = await SendAsync(httpRequest).ConfigureAwait(false);

            return(System.Text.Json.JsonSerializer.Deserialize <CountResult>(responseText));
        }
示例#3
0
        public async Task <QueryResult> QueryAsync(DynamoQuery query)
        {
            var httpRequest = Setup("Query", query.ToJson());

            var responseText = await SendAsync(httpRequest).ConfigureAwait(false);

            var responseJson = JsonObject.Parse(responseText);

            return(QueryResult.FromJson(responseJson));
        }
示例#4
0
        public async Task <CountResult> QueryCountAsync(DynamoQuery query)
        {
            query.Select = SelectEnum.COUNT;

            var httpRequest = Setup("Query", query.ToJson());

            var responseText = await SendAsync(httpRequest).ConfigureAwait(false);

            var responseJson = JsonObject.Parse(responseText);

            return(responseJson.As <CountResult>());
        }
示例#5
0
        public async Task <QueryResult> QueryAsync(DynamoQuery query)
        {
            #region Preconditions

            if (query == null)
            {
                throw new ArgumentNullException(nameof(query));
            }

            #endregion

            var httpRequest = Setup("Query", query.ToJson());

            var responseText = await SendAsync(httpRequest).ConfigureAwait(false);

            var responseJson = JsonObject.Parse(responseText);

            return(QueryResult.FromJson(responseJson));
        }