I'm trying to query all queued notifications of my table 'notifications' table in DynamoDB.
Global Secondary Indexes: Name: idTo-time-index
Hash Key: idTo (Number)
Range Key: time (Number)
Why I'm getting all results and not only the ones with status=='queued'?
$params = array(
'TableName' => 'notifications',
'IndexName' => 'idTo-time-index',
'KeyConditions' => array(
"idTo" => array(
"AttributeValueList" => array(
array('N' => 1)
),
"ComparisonOperator" => "EQ"
)
),
'ScanIndexForward' => false,
'QueryFilter' => array(
"status" => array(
"AttributeValueList" => array(
array('S' => (string)"queued")
),
"ComparisonOperator" => "EQ"
)
),
);
$response = $dynoClient->query($params);
I had the same problem, I solve that problem by updating the ASW SDK, the reason is that query filter was added recently, in my old SDK when i execute the same query then Query filter was not working.
Updating the SDK should solve your problem
Hope that helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With