いくつかの簡単な変更を加えて、Amazonドキュメントのコードを使用して作成したDynamoDBにクエリを実行しようとしています。取得したデータを取得して、文字列としてログファイルに書き込もうとしています。しかし、私が得ることができるのはこれだけです:
2013-02-22 20:21:37.9268|トレース|[System.Collections.Generic.Dictionary2 2+KeyCollection[System.String,Amazon.DynamoDB.Model.AttributeValue] System.Collections.Generic.Dictionary+ ValueCollection [System.String、Amazon.DynamoDB.Model.AttributeValue]] |
私はいくつかの異なることを試しましたが、すべて同じもの、または非常に類似したものを返します。
私が使用しているコード:
  private static void GetCallsForRange()
  {
     AmazonDynamoDBConfig config = new AmazonDynamoDBConfig();
     config.ServiceURL = "http://dynamodb.us-west-2.amazonaws.com";
     AmazonDynamoDBClient client = new AmazonDynamoDBClient(config);
     DateTime startDate = DateTime.Today.AddDays(-21);
     string start = startDate.ToString("G", DateTimeFormatInfo.InvariantInfo);
     DateTime endDate = DateTime.Today;
     string end = endDate.ToString("G", DateTimeFormatInfo.InvariantInfo);
     QueryRequest request = new QueryRequest
     {
        TableName = "Inquiry",
        HashKeyValue = new AttributeValue { S = "+15555555555" },
        RangeKeyCondition = new Condition
        {
           ComparisonOperator = "BETWEEN",
           AttributeValueList = new List<AttributeValue>()
           {
              new AttributeValue { S = start },
              new AttributeValue { S = end }
           }
        }
     };
     QueryResponse response = client.Query(request);
     QueryResult result = response.QueryResult;
     foreach (Dictionary<string, AttributeValue> item in response.QueryResult.Items)
     {
        string logMsg = String.Format("[{0} {1}]", item.Keys, item.Values);
        Logging.LogTrace(logMsg);
     }
  }