aws-sdk-esp8266 icon indicating copy to clipboard operation
aws-sdk-esp8266 copied to clipboard

getting the Query operation to work

Open georgedd opened this issue 8 years ago • 3 comments
trafficstars

I am using the aws-sdk-esp8266 successfully with a ESP 12F with both the "GetItem" & "PutItem" functions, BUT am struggling in getting the Query operation to work. Can anyone please help me.

The difficult section appears to be defining Key_Conditions and/or Conditions.

The following does NOT work:

queryInput.setTableName(TableName); queryInput.setIndexName(HASH_KEY_NAME);

// Condition Represents the selection criteria for a Query or Scan operation: For a Query operation, // Condition is used for specifying the KeyConditions to use when querying a table or an index. // For KeyConditions, only the following comparison operators are supported: EQ | LE | LT | GE | GT | // BEGINS_WITH | BETWEEN

Condition condition; condition.setComparisonOperator(EQ_COMPARISONOPERATOR); hashKey.setS(HASH_KEY_VALUE); AttributeValue AttrV1[] = { hashKey }; condition.setComparisonOperator(BETWEEN_COMPARISONOPERATOR); QueryOutput queryOutput = ddbClient.query(queryInput, actionError); ..

Please help me in getting the Query operation (using both the Primary partition key HASH_KEY_NAME / HASH_KEY_VALUE ("S") & Primary sort key RANGE_KEY_NAME / RANGE_KEY_VALUE ("N")) to work.

Best George.

georgedd avatar Feb 27 '17 13:02 georgedd

Have you solved your problem?

EngineerWill avatar Mar 03 '18 08:03 EngineerWill

Can you show your "GetItem" & "PutItem" functions?

EngineerWill avatar Mar 04 '18 05:03 EngineerWill

Have you solved your problem?, If so, can you show your "Query" function... As there is no examples of using Query API, me also struggling, please help...

MAIDubai avatar Jun 21 '18 05:06 MAIDubai