Class: DynamoidAdvancedWhere::Nodes::LiteralNode
- Inherits:
-
Object
- Object
- DynamoidAdvancedWhere::Nodes::LiteralNode
- Defined in:
- lib/dynamoid_advanced_where/nodes/literal_node.rb
Instance Attribute Summary collapse
-
#attr_prefix ⇒ Object
Returns the value of attribute attr_prefix.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #expression_attribute_names ⇒ Object
- #expression_attribute_values ⇒ Object
-
#initialize(value) ⇒ LiteralNode
constructor
A new instance of LiteralNode.
- #to_expression ⇒ Object
Constructor Details
#initialize(value) ⇒ LiteralNode
Returns a new instance of LiteralNode.
10 11 12 13 14 |
# File 'lib/dynamoid_advanced_where/nodes/literal_node.rb', line 10 def initialize(value) self.value = value self.attr_prefix = SecureRandom.hex freeze end |
Instance Attribute Details
#attr_prefix ⇒ Object
Returns the value of attribute attr_prefix.
8 9 10 |
# File 'lib/dynamoid_advanced_where/nodes/literal_node.rb', line 8 def attr_prefix @attr_prefix end |
#value ⇒ Object
Returns the value of attribute value.
8 9 10 |
# File 'lib/dynamoid_advanced_where/nodes/literal_node.rb', line 8 def value @value end |
Instance Method Details
#expression_attribute_names ⇒ Object
20 21 22 |
# File 'lib/dynamoid_advanced_where/nodes/literal_node.rb', line 20 def expression_attribute_names {} end |
#expression_attribute_values ⇒ Object
24 25 26 |
# File 'lib/dynamoid_advanced_where/nodes/literal_node.rb', line 24 def expression_attribute_values { ":#{attr_prefix}" => value } end |
#to_expression ⇒ Object
16 17 18 |
# File 'lib/dynamoid_advanced_where/nodes/literal_node.rb', line 16 def to_expression ":#{attr_prefix}" end |