我想在dynamodb
我想在4場 rule0
這是獨一無二的,因此hash key
, which_rule
是Global Index
搜索多個列執行query
, rule1
是Global Index
, rule2
是Global Index
,Dynamodb查詢不能
我搜索rule0
然後rule1
然後rule2
我正在使用以下函數來匹配rule1
原因匹配不rule0
function dynamoQueryRule1(rule0, rule1, funcQ) {
which_rule = "rule1";
var q = {
"KeyConditions": {
"rule0": {
"ComparisonOperator": "EQ",
"AttributeValueList": [{
"S": rule0
}]
}
},
"TableName": "tbl_scripts" + table_prefix,
"AttributesToGet": ['id'],
"ConditionalOperator": "AND",
"QueryFilter": {
"which_rule": {
"ComparisonOperator": "EQ",
"AttributeValueList": [{
"S": which_rule
}]
},
"rule1": {
"ComparisonOperator": "EQ",
"AttributeValueList": [{
"S": rule1
}]
}
}
};
var params = {
TableName: this.options.tbl_name
};
找到,但這個功能是從來沒有得到結果rule1
。即使我已經在dymamo table
中創建了這些規則。 要檢查發電機數據,我已檢查scan
其工作正常,但scan
有1mb的限制,並不完美的用例,我的問題。 請幫我找到query
格式的錯誤。