I have a dynamodb table which has a GlobalSecondaryIndex with a date field as attribute of keytype "range". Values are stored in ISO-format "YYYY-MM-DD". I want to access in node only records with dates greater than a certain date. It seems to work with a parameter for my query:
KeyConditionExpression: 'myDate >= :myDate',
ExpressionAttributeValues: {
':myDate': '2017-11-17'
}
However I do not quite understand. The date is technically speaking a string. Is it reliable to trust the string comparison or should it be done in a different way?