Class: AWS::DynamoDB::ItemCollection::FilterBuilder
- Inherits:
-
Object
- Object
- AWS::DynamoDB::ItemCollection::FilterBuilder
- Defined in:
- lib/aws/dynamo_db/item_collection.rb
Overview
Provides a convenient syntax for expressing scan filters.
table.items.where(:path).begins_with("users/")
Instance Attribute Summary (collapse)
-
- (Object) attribute
readonly
Returns the value of attribute attribute.
-
- (Object) items
readonly
Returns the value of attribute items.
Instance Method Summary (collapse)
-
- (ItemCollection) begins_with(value)
Filters the collection to include only those items where this attribute begins with the argument.
-
- (ItemCollection) between(min, max)
Filters the collection to include only those items where this attribute is between the two arguments.
-
- (ItemCollection) contains(value)
Filters the collection to include only those items where this attribute contains the argument.
-
- (ItemCollection) does_not_contain(value)
Filters the collection to include only those items where this attribute does not contain the argument.
-
- (ItemCollection) equals(value)
Filters the collection to include only those items where the value of this attribute is equal to the argument.
-
- (ItemCollection) greater_than(value)
Filters the collection to include only those items where the value of this attribute is greater than the argument.
-
- (ItemCollection) gte(value)
Filters the collection to include only those items where the value of this attribute is greater than or equal to the argument.
-
- (ItemCollection) in(*values)
Filters the collection to include only those items where this attribute equals one of the arguments.
-
- (ItemCollection) is_null
Filters the collection to include only those items where this attribute does not exist.
-
- (ItemCollection) less_than(value)
Filters the collection to include only those items where the value of this attribute is less than the argument.
-
- (ItemCollection) lte(value)
Filters the collection to include only those items where the value of this attribute is less than or equal to the argument.
-
- (ItemCollection) not_equal_to(value)
Filters the collection to include only those items where the value of this attribute is not equal to the argument.
-
- (ItemCollection) not_null
Filters the collection to include only those items where this attribute exists.
Instance Attribute Details
- (Object) attribute (readonly)
Returns the value of attribute attribute
260 261 262 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 260 def attribute @attribute end |
- (Object) items (readonly)
Returns the value of attribute items
258 259 260 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 258 def items @items end |
Instance Method Details
- (ItemCollection) begins_with(value)
Filters the collection to include only those items where this attribute begins with the argument.
393 394 395 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 393 def begins_with value @items.with_filter(attribute, "BEGINS_WITH", value) end |
- (ItemCollection) between(min, max)
Filters the collection to include only those items where this attribute is between the two arguments.
418 419 420 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 418 def between min, max @items.with_filter(attribute, "BETWEEN", min, max) end |
- (ItemCollection) contains(value)
Filters the collection to include only those items where this attribute contains the argument. If the attribute value is a set, this filter matches items where the argument is one of the values in the set. If the attribute value is a string, this filter matches items where the argument (which must be a string) is a substring of the attribute value.
366 367 368 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 366 def contains value @items.with_filter(attribute, "CONTAINS", value) end |
- (ItemCollection) does_not_contain(value)
Filters the collection to include only those items where this attribute does not contain the argument. If the attribute value is a set, this filter matches items where the argument is not present in the set. If the attribute value is a string, this filter matches items where the argument (which must be a string) is not a substring of the attribute value.
382 383 384 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 382 def does_not_contain value @items.with_filter(attribute, "NOT_CONTAINS", value) end |
- (ItemCollection) equals(value)
Filters the collection to include only those items where the value of this attribute is equal to the argument.
275 276 277 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 275 def equals value @items.with_filter(attribute, "EQ", value) end |
- (ItemCollection) greater_than(value)
Filters the collection to include only those items where the value of this attribute is greater than the argument.
308 309 310 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 308 def greater_than value @items.with_filter(attribute, "GT", value) end |
- (ItemCollection) gte(value)
Filters the collection to include only those items where the value of this attribute is greater than or equal to the argument.
332 333 334 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 332 def gte value @items.with_filter(attribute, "GE", value) end |
- (ItemCollection) in(*values)
Filters the collection to include only those items where this attribute equals one of the arguments.
405 406 407 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 405 def in *values @items.with_filter(attribute, "IN", *values) end |
- (ItemCollection) is_null
Filters the collection to include only those items where this attribute does not exist.
341 342 343 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 341 def is_null @items.with_filter(attribute, "NULL") end |
- (ItemCollection) less_than(value)
Filters the collection to include only those items where the value of this attribute is less than the argument.
297 298 299 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 297 def less_than value @items.with_filter(attribute, "LT", value) end |
- (ItemCollection) lte(value)
Filters the collection to include only those items where the value of this attribute is less than or equal to the argument.
320 321 322 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 320 def lte value @items.with_filter(attribute, "LE", value) end |
- (ItemCollection) not_equal_to(value)
Filters the collection to include only those items where the value of this attribute is not equal to the argument.
286 287 288 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 286 def not_equal_to value @items.with_filter(attribute, "NE", value) end |
- (ItemCollection) not_null
Filters the collection to include only those items where this attribute exists.
350 351 352 |
# File 'lib/aws/dynamo_db/item_collection.rb', line 350 def not_null @items.with_filter(attribute, "NOT_NULL") end |