Expression

meteor.Expression
See theExpression companion object
case class Expression(expression: String, attributeNames: Map[String, String], attributeValues: Map[String, AttributeValue])

Abstraction over DynamoDB expressions, this can be key condition expression, update expression, projection expression etc.. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.html.

It is recommended to avoid DynamoDB's reserved words in expression string by providing expression as raw String with attribute names and values as placeholders only. Attribute names and values can then be replaced separately via attributeNames and attributeValues maps.

Example:

import meteor.Expression
import meteor.syntax._

Expression(
 "#b = :my_bool and #i > :my_int",
 Map("#b" -> "my_bool_attribute_name", "#i" -> "my_int_attribute_name"),
 Map(
   ":my_bool" -> true.asAttributeValue,
   ":my_int" -> 0.asAttributeValue
 )
)

Value parameters

attributeNames

a map of attribute name placeholders in the raw String above to the actual attribute names in the table

attributeValues

a map of attribute value placeholders in the raw String above to the actual attribute values

expression

expression as raw String

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

val isEmpty: Boolean
val nonEmpty: Boolean