Comments (3)
Actually, you can just pass additional options available in AWS::DynamoDB::Client into the #query e.g :limit, :scan_index_forward. Just make sure to add the :select option with [attributes_to_get] so you get ItemData object (real data) right away; otherwise you will have Item object as return value without real data and will have to make addition get_item request using item.attributes.to_h (As mentioned in #151).
table.items.query(:select => :all, :range_greater_than=> "1", :limit => 2, :consistent_read => true,
:exclusive_start_key => { # => this is ugly
:hash_key_element => {:s => "1"},
:range_key_element => {:s => "11"}
}
) do |item_data|
puts item_data.attributes #=> a hash of selected attributes
item_data.item #=> the AWS::DynamoDB::Item object for this attribute bag
end
from aws-sdk-ruby.
Thanks @qminhdo for answering the question. Please re-open the issue @karlfreeman if there is anything else this doesn't resolve.
from aws-sdk-ruby.
Thanks for the clarification. Keep up the good work.
from aws-sdk-ruby.
Related Issues (20)
- Object#download_file Add Progress Callback HOT 3
- SDK throw ArgumentError when the "workgroup_name" input is valid in Aws::RedshiftDataAPIService::Client HOT 3
- [SES] Custom verification email template no redirect HOT 9
- SQS QueuePoller sometimes returns dupe messages, raises BatchEntryIdsNotDistinct HOT 1
- DynamoDB #query method returns response with items = nil HOT 18
- Aws::S3::PresignedPost does not support tagging field HOT 3
- Multipart copy for Glacier
- CognitoIdentityCredentials is not including the logins set when getting credentials, making all requests unauthenticated HOT 5
- `Aws::BedrockRuntime::Types::<X>` doesn't have `event_type=` HOT 3
- Listing shared RDS Clusters raises an ArgumentError HOT 6
- Errors downloading files from s3 are propagated to incorrect thread HOT 8
- aws-sdk-sqs raises NoMethodError when messages not found HOT 14
- Generate RBS HOT 15
- aws-partitions 1.856.0 no longer be found in that source HOT 8
- aws-sigv4/eventstream released a minor version bump after removing support for Ruby 2.3/2.4 HOT 5
- [aws-sdk-sqs] Aws::SQS::Types::SendMessageBatchResult#failed returns nil HOT 8
- aws-sdk-sesv2 API :next_token Symbol key literal doesn't work as expected (but String key does) HOT 4
- S3 Control Client - Unable to Parse URI HOT 6
- AWS Bedrock ReadTimeout NetworkingError TCPSocket closed HOT 3
- Tagging resources seems to be broken HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-sdk-ruby.