Query

meteor.Query
See theQuery companion object
case class Query[P, S](partitionKey: P, sortKeyQuery: SortKeyQuery[S], filter: Expression)(implicit evidence$1: Encoder[P], evidence$2: Encoder[S])

Represent a DynamoDB's query where a partition key value is required, sortKeyQuery and filter are optional.

Examples:

// query for an item where partition key == "some-partition-key", sort key == "some-sort-key" but only
// return a value if the filter's condition is med ("my_bool_attribute_name" == true)
val query: Query[String, String] =
 Query(
   "some-partition-key",
   SortKeyQuery.EqualTo("some-sort-key"),
   Expression(
     "#b = :my_bool",
     Map("#b" -> "my_bool_attribute_name"),
     Map(
       ":my_bool" -> true.asAttributeValue
     )
   )
 )

// query for an item where partition key == "some-partition-key", the table doesn't have sort key, only
// return a value if the filter's condition is med ("my_bool_attribute_name" == true)
val query: Query[String, Nothing] =
 Query(
   "some-partition-key",
   Expression(
     "#b = :my_bool",
     Map("#b" -> "my_bool_attribute_name"),
     Map(
       ":my_bool" -> true.asAttributeValue
     )
   )
 )

Type parameters

P

partition key's type

S

sort key's type (Nothing type for table without sort key)

Value parameters

filter

filter expression

partitionKey

partition key value

sortKeyQuery

sort key query

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