Package

com.gu

scanamo

Permalink

package scanamo

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. scanamo
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class AndEqualsCondition[H, R](hashEquality: H, rangeEquality: R)(implicit evidence$4: UniqueKeyCondition[H], evidence$5: UniqueKeyCondition[R]) extends Product with Serializable

    Permalink
  2. case class AndQueryCondition[H, R](hashCondition: KeyEquals[H], rangeCondition: RangeKeyCondition[R])(implicit evidence$6: DynamoFormat[H], evidence$7: DynamoFormat[R]) extends Product with Serializable

    Permalink
  3. final case class BatchGet(req: BatchGetItemRequest) extends ScanamoOpsA[BatchGetItemResult] with Product with Serializable

    Permalink
  4. final case class BatchWrite(req: BatchWriteItemRequest) extends ScanamoOpsA[BatchWriteItemResult] with Product with Serializable

    Permalink
  5. final case class Delete(req: DeleteItemRequest) extends ScanamoOpsA[DeleteItemResult] with Product with Serializable

    Permalink
  6. trait DerivedDynamoFormat extends AnyRef

    Permalink
  7. trait DynamoFormat[T] extends Serializable

    Permalink

    Type class for defining serialisation to and from DynamoDB's AttributeValue

    Type class for defining serialisation to and from DynamoDB's AttributeValue

    >>> val mapF = DynamoFormat[Map[String, List[Int]]]
    >>> mapF.read(mapF.write(Map("foo" -> List(1, 2, 3), "bar" -> List(3, 2, 1))))
    Valid(Map(foo -> List(1, 2, 3), bar -> List(3, 2, 1)))

    Also supports automatic derivation for case classes

    >>> case class Farm(animals: List[String])
    >>> case class Farmer(name: String, age: Long, farm: Farm)
    >>> val farmerF = DynamoFormat[Farmer]
    >>> farmerF.read(farmerF.write(Farmer("McDonald", 156L, Farm(List("sheep", "cow")))))
    Valid(Farmer(McDonald,156,Farm(List(sheep, cow))))

    Problems reading a value are detailed

    >>> case class Developer(name: String, age: String, problems: Int)
    >>> val invalid = DynamoFormat[Farmer].read(DynamoFormat[Developer].write(Developer("Alice", "none of your business", 99)))
    Invalid(OneAnd(PropertyReadError(age,OneAnd(NoPropertyOfType(N),List())),List(PropertyReadError(farm,OneAnd(MissingProperty,List())))))
    >>> invalid.leftMap(DynamoReadError.describeAll(_))
    Invalid('age': not of type: 'N', 'farm': missing)

    Optional properties are defaulted to None

    >>> case class LargelyOptional(a: Option[String], b: Option[String])
    >>> DynamoFormat[LargelyOptional].read(DynamoFormat[Map[String, String]].write(Map("b" -> "X")))
    Valid(LargelyOptional(None,Some(X)))
  8. sealed abstract class DynamoOperator extends AnyRef

    Permalink
  9. sealed abstract class DynamoReadError extends AnyRef

    Permalink
  10. trait DynamoResultStream[Req, Res] extends AnyRef

    Permalink
  11. final case class Get(req: GetItemRequest) extends ScanamoOpsA[GetItemResult] with Product with Serializable

    Permalink
  12. case class KeyBeginsWith[V](key: Symbol, v: V)(implicit evidence$9: DynamoFormat[V]) extends RangeKeyCondition[V] with Product with Serializable

    Permalink
  13. case class KeyEquals[V](key: Symbol, v: V)(implicit evidence$1: DynamoFormat[V]) extends Product with Serializable

    Permalink
  14. case class KeyIs[V](key: Symbol, operator: DynamoOperator, v: V)(implicit evidence$8: DynamoFormat[V]) extends RangeKeyCondition[V] with Product with Serializable

    Permalink
  15. case class KeyList[T](key: Symbol, values: List[T])(implicit evidence$9: DynamoFormat[T]) extends Product with Serializable

    Permalink
  16. case class MultipleKeyList[H, R](keys: (Symbol, Symbol), values: List[(H, R)])(implicit evidence$10: DynamoFormat[H], evidence$11: DynamoFormat[R]) extends Product with Serializable

    Permalink
  17. case class NoPropertyOfType(propertyType: String) extends DynamoReadError with Product with Serializable

    Permalink
  18. case class PropertyReadError(name: String, problem: NonEmptyList[DynamoReadError]) extends DynamoReadError with Product with Serializable

    Permalink
  19. final case class Put(req: PutItemRequest) extends ScanamoOpsA[PutItemResult] with Product with Serializable

    Permalink
  20. case class Query[T](t: T)(implicit qkc: QueryableKeyCondition[T]) extends Product with Serializable

    Permalink
  21. final case class QueryOp(req: QueryRequest) extends ScanamoOpsA[QueryResult] with Product with Serializable

    Permalink
  22. trait QueryableKeyCondition[T] extends Serializable

    Permalink
  23. sealed abstract class RangeKeyCondition[V] extends AnyRef

    Permalink
  24. final case class Scan(req: ScanRequest) extends ScanamoOpsA[ScanResult] with Product with Serializable

    Permalink
  25. type ScanamoOps[A] = Free[ScanamoOpsA, A]

    Permalink
  26. sealed trait ScanamoOpsA[A] extends AnyRef

    Permalink
  27. case class TypeCoercionError(e: Exception) extends DynamoReadError with Product with Serializable

    Permalink
  28. case class UniqueKey[T](t: T)(implicit evidence$4: UniqueKeyCondition[T]) extends Product with Serializable

    Permalink
  29. trait UniqueKeyCondition[T] extends Serializable

    Permalink
  30. trait UniqueKeyConditions[T] extends Serializable

    Permalink
  31. case class UniqueKeys[T](t: T)(implicit evidence$8: UniqueKeyConditions[T]) extends Product with Serializable

    Permalink

Value Members

  1. object DynamoFormat extends DerivedDynamoFormat with Serializable

    Permalink
  2. object DynamoReadError

    Permalink
  3. object DynamoResultStream

    Permalink
  4. object GT extends DynamoOperator

    Permalink
  5. object GTE extends DynamoOperator

    Permalink
  6. object LT extends DynamoOperator

    Permalink
  7. object LTE extends DynamoOperator

    Permalink
  8. object MissingProperty extends DynamoReadError with Product with Serializable

    Permalink
  9. object QueryableKeyCondition extends Serializable

    Permalink
  10. object Scanamo

    Permalink

    Provides a simplified interface for reading and writing case classes to DynamoDB

    Provides a simplified interface for reading and writing case classes to DynamoDB

    To avoid blocking, use com.gu.scanamo.ScanamoAsync

  11. object ScanamoAsync

    Permalink

    Provides the same interface as com.gu.scanamo.Scanamo, except that it requires an implicit concurrent.ExecutionContext and returns a concurrent.Future

    Provides the same interface as com.gu.scanamo.Scanamo, except that it requires an implicit concurrent.ExecutionContext and returns a concurrent.Future

    Note that that com.amazonaws.services.dynamodbv2.AmazonDynamoDBAsyncClient just uses an java.util.concurrent.ExecutorService to make calls asynchronously

  12. object ScanamoFree

    Permalink
  13. object ScanamoInterpreters

    Permalink
  14. object ScanamoOps

    Permalink
  15. object ScanamoRequest

    Permalink
  16. object UniqueKeyCondition extends Serializable

    Permalink
  17. object UniqueKeyConditions extends Serializable

    Permalink
  18. object syntax

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped