Functions
Sorry to ask it as an issue but I couldn't find any other better channel to ask.. :)
I'd like to know what functions are available to be used in a select/scan statement. For example:
- How can I filter dates, let's say last three months or fixed values ?
- I could use WHERE aField = true but since the field is optional, I'd like to calculate the final value, like (aField = true) as final_value
- How could I use something like an IF anotherField = "a" THEN "OK" ELSE "NOT OK" ?
Maybe the documentation could have an index of all available functions... :)
I didn't put every function explicitly in the docs, but if you look at the page on SELECT it redirects to the AWS docs on Key Condition Expressions and Filter Expressions. DQL is just a convenient wrapper around DynamoDB, and can't provide any additional capabilities. I highly recommend becoming familiar with what DynamoDB itself exposes.
To filter dates, it will depend on what format they're stored in. Assuming unix timestamps in seconds:
SCAN * FROM mytable WHERE date > NOW() - INTERVAL('90 DAYS'). That will do a full table scan. If you want it to do anything smarter you have to be clever with how you create the indexes on the table.
For the other questions, there's no support for those language constructs.