class Amazonite::DynamoDB::AttributeValue

Overview

Represents the data for an attribute.

Each attribute value is described as a name-value pair. The name is the data type, and the value is the data itself.

For more information, see Data Types in the Amazon DynamoDB Developer Guide.

Included Modules

Defined in:

dynamodb/attribute_value.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(s : String | Nil = nil, n : String | Nil = nil, b : Bytes | Nil = nil, ss : Array(String) | Nil = nil, ns : Array(String) | Nil = nil, bs : Array(Bytes) | Nil = nil, m : Hash(String, AttributeValue) | Nil = nil, l : Array(AttributeValue) | Nil = nil, null : Bool | Nil = nil, bool : Bool | Nil = nil) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def b : Bytes | Nil #

An attribute of type Binary. For example:

"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"


[View source]
def b=(b : Bytes | Nil) #

An attribute of type Binary. For example:

"B": "dGhpcyB0ZXh0IGlzIGJhc2U2NC1lbmNvZGVk"


[View source]
def bool : Bool | Nil #

An attribute of type Boolean. For example:

"BOOL": true


[View source]
def bool=(bool : Bool | Nil) #

An attribute of type Boolean. For example:

"BOOL": true


[View source]
def bs : Array(Bytes) | Nil #

An attribute of type Binary Set. For example:

"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]


[View source]
def bs=(bs : Array(Bytes) | Nil) #

An attribute of type Binary Set. For example:

"BS": ["U3Vubnk=", "UmFpbnk=", "U25vd3k="]


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def l : Array(AttributeValue) | Nil #

An attribute of type List. For example:

"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N": "3.14159"}]


[View source]
def l=(l : Array(AttributeValue) | Nil) #

An attribute of type List. For example:

"L": [ {"S": "Cookies"} , {"S": "Coffee"}, {"N": "3.14159"}]


[View source]
def m : Hash(String, AttributeValue) | Nil #

An attribute of type Map. For example:

"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}


[View source]
def m=(m : Hash(String, AttributeValue) | Nil) #

An attribute of type Map. For example:

"M": {"Name": {"S": "Joe"}, "Age": {"N": "35"}}


[View source]
def n : String | Nil #

An attribute of type Number. For example:

"N": "123.45"

Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.


[View source]
def n=(n : String | Nil) #

An attribute of type Number. For example:

"N": "123.45"

Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.


[View source]
def ns : Array(String) | Nil #

An attribute of type Number Set. For example:

"NS": ["42.2", "-19", "7.5", "3.14"]

Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.


[View source]
def ns=(ns : Array(String) | Nil) #

An attribute of type Number Set. For example:

"NS": ["42.2", "-19", "7.5", "3.14"]

Numbers are sent across the network to DynamoDB as strings, to maximize compatibility across languages and libraries. However, DynamoDB treats them as number type attributes for mathematical operations.


[View source]
def null : Bool | Nil #

An attribute of type Null. For example:

"NULL": true


[View source]
def null=(null : Bool | Nil) #

An attribute of type Null. For example:

"NULL": true


[View source]
def s : String | Nil #

An attribute of type String. For example:

"S": "Hello"


[View source]
def s=(s : String | Nil) #

An attribute of type String. For example:

"S": "Hello"


[View source]
def ss : Array(String) | Nil #

An attribute of type String Set. For example:

"SS": ["Giraffe", "Hippo" ,"Zebra"]


[View source]
def ss=(ss : Array(String) | Nil) #

An attribute of type String Set. For example:

"SS": ["Giraffe", "Hippo" ,"Zebra"]


[View source]
def validate! : Nil #

[View source]