-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate to expression attributes for Query and Scan #655
Migrate to expression attributes for Query and Scan #655
Conversation
Codecov Report
@@ Coverage Diff @@
## master #655 +/- ##
==========================================
+ Coverage 90.28% 90.33% +0.04%
==========================================
Files 61 62 +1
Lines 3141 3157 +16
==========================================
+ Hits 2836 2852 +16
Misses 305 305
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
22ddc25
to
9694b51
Compare
9694b51
to
ceb1c37
Compare
Hi @andrykonchin 👋 Just tried to use multiple conditions on the same key: Score.where("timestamp.gte": 1.day.ago).where("timestamp.lte": Time.now).count And also got Is see the spec are skipped for it.. But maybe any info on the plans to support multiple conditions? |
Thank you for reporting the issue. So DynamoDB allows only one condition for a sort key. I've completely overlooked this restriction. Could you please describe it in a separate issue? In this particular case Generally speaking supporting multiple conditions for a sort key isn't as useful as it may seem. DynamoDB supports only subset of operations for searching (in The only issue with supporting multiple conditions for sort key is that only one of them will be used as a search condition and all the other will be used as filter conditions. This choice will affect performance and cost. For instance there are conditions |
Get rid of legacy
Query
/Scan
's attributes.Use
FilterExpression
,KeyConditionExpression
andProjectionExpression
instead of legacyScanFilter
,QueryFiler
andAttributesToGet
attributes inScan
andQuery
operations.Changes:
where
for the same attribute