0

While trying to scan my new database based on a boolean ScanCondition I encountered what I think is a bug. I have the following:

try{
  var search = context.ScanAsync<Card>(new ScanCondition("Contest",ScanOperator.Equal,false));
  search.GetRemainingAsync(result=>{
    if(result.Exception != null){
      //Handle Exception
    }else{
      foreach(Card a in result.Result){
      print("RESULT: " + a.Name);
    }
  }
 });
}

The database has a card, TestCard, with a value of Contest = false. However, this ScanAsync does not return the TestCard. If I change the ScanOperator to ScanOperator.NotEqual and again scan for cards with Contest = false, it will return the card erroneously. Apparently, it is not translating between the DynamoDB Boolean and the C# bool values.

Has anyone else encountered this bug? I was under the impression that all primitives translated automatically.

1 Answer 1

1

The "Scan" feature of a DynamoDB table will only compare strings, binaries, and numbers. Scanning on a different primitive type doesn't throw an error, but it also does not compare correctly.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.