Method: Dynamoid::Document::ClassMethods#count
- Defined in:
- lib/dynamoid/document.rb
#count ⇒ Integer
Return the count of items for this class.
It returns approximate value based on DynamoDB statistic. DynamoDB updates it periodically so the value can be no accurate.
It’s a reletively cheap operation and doesn’t read all the items in a table. It makes just one HTTP request to DynamoDB.
82 83 84 |
# File 'lib/dynamoid/document.rb', line 82 def count Dynamoid.adapter.count(table_name) end |