Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    semenodm
    @semenodm
    Hi here
    what would be the best way to compose two operations in scanamo
    for {
      maybeErrorOrOrderItem ← MojoTable.OrderItems.dynamoTable
        .get(UniqueKey(KeyEquals(AttributeName.of("id"), id)))
      maybeErrorOrProduct ← MojoTable.Products.dynamoTable
        .get(UniqueKey(KeyEquals(AttributeName.of("id"), oi.product_id))) // need to extract product id from maybeErrorOrOrderItem
    } yield (maybeErrorOrProduct)
    something like this
    i never used Free before
    and return type ption[Either[Throwable,T]] is confusing me
    Andrea
    @Andrea

    Hi there. Just trying this out today and

        val client = LocalDynamoDB.client()
        import com.amazonaws.services.dynamodbv2.model.ScalarAttributeType._
    
        val xx = LocalDynamoDB.createTable(client)("muppets")('name -> S)
        logger.info(s"Create: $xx")

    I just never see the logger info. It fails with : com.amazonaws.SdkClientException: Unable to execute HTTP request: Connect to localhost:8042 [localhost/127.0.0.1] failed: Connection refused (Connection refused) I assume I should be running something in that port, what would that be?

    Thanks :D
    Andrea
    @Andrea
    semenodm
    @semenodm
    hi
    implicit val stringFormat: DynamoFormat[String] = new DynamoFormat[String] {
        final def read(av: DynamoValue) =
            if (av.isNull)
                Right("")
            else
                av.asString.fold[Either[DynamoReadError, String]](Left(NoPropertyOfType("S", av)))(Right(_))
    shouldn't it be DynamoReadError if field is missing
    ?