Open jkeczan opened 8 years ago
It should be supported– this is a bug. Will take a PR.
After further research, the not null and null are supported; however, they are only supported for scans, not for index queries. With that in mind, I believe that the indexes are being improperly chosen. For example, if you pass through the primary hash and a non-index based column, it will STILL try to use the primary index which results in error.
The solution is to confirm that all columns passed through the where clause are actually apart of an index. If they are not, then a scan should be performed instead.
Ah, you're probably right. I'm pretty sure that should be detected right around here: https://github.com/gadelkareem/sails-dynamodb/blob/9ca0c93195c012103fb4dd4941e1e7ad2398db2e/index.js#L708
We agree as well. We don't have the time to push a PR right now so we wanted to get all of the info here for anybody else.
When testing query using where clause with either 'null' or 'notNull' conditions specified, an error occurs.
Code:
Error:
Are these intentionally no longer supported? If so, can we update the documentation, as it can be misleading?