scanamo-formats


License

License

Categories

Categories

ORM Data
GroupId

GroupId

com.gu
ArtifactId

ArtifactId

scanamo-formats_2.12
Last Version

Last Version

1.0.0-M8
Release Date

Release Date

Type

Type

jar
Description

Description

scanamo-formats
scanamo-formats
Project URL

Project URL

http://www.scanamo.org/
Project Organization

Project Organization

com.gu
Source Code Management

Source Code Management

https://github.com/scanamo/scanamo

Download scanamo-formats_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.gu/scanamo-formats_2.12/ -->
<dependency>
    <groupId>com.gu</groupId>
    <artifactId>scanamo-formats_2.12</artifactId>
    <version>1.0.0-M8</version>
</dependency>
// https://jarcasting.com/artifacts/com.gu/scanamo-formats_2.12/
implementation 'com.gu:scanamo-formats_2.12:1.0.0-M8'
// https://jarcasting.com/artifacts/com.gu/scanamo-formats_2.12/
implementation ("com.gu:scanamo-formats_2.12:1.0.0-M8")
'com.gu:scanamo-formats_2.12:jar:1.0.0-M8'
<dependency org="com.gu" name="scanamo-formats_2.12" rev="1.0.0-M8">
  <artifact name="scanamo-formats_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.gu', module='scanamo-formats_2.12', version='1.0.0-M8')
)
libraryDependencies += "com.gu" % "scanamo-formats_2.12" % "1.0.0-M8"
[com.gu/scanamo-formats_2.12 "1.0.0-M8"]

Dependencies

compile (5)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.7
com.amazonaws : aws-java-sdk-dynamodb jar 1.11.256
com.chuusai : shapeless_2.12 jar 2.3.3
com.github.mpilquist : simulacrum_2.12 jar 0.11.0
org.typelevel : cats-core_2.12 jar 1.3.1

test (3)

Group / Artifact Type Version
com.gu : scanamo-testkit_2.12 jar 1.0.0-M8
org.scalatest : scalatest_2.12 jar 3.0.5
org.scalacheck : scalacheck_2.12 jar 1.13.5

Project Modules

There are no modules declared in this project.
CI Coverage Release Issues Users Chat
Build Status Coverage Status Release Artifacts Average time to resolve an issue Scaladex dependencies badge Gitter

Scanamo is a library to make using DynamoDB with Scala simpler and less error-prone.

The main focus is on making it easier to avoid mistakes and typos by leveraging Scala's type system and some higher level abstractions.

Installation

libraryDependencies += "org.scanamo" %% "scanamo" % "1.0.0-M10"

Scanamo is published for Scala 2.13 and Scala 2.12.

Basic Usage

Note: the LocalDynamoDB object is provided by the scanamo-testkit package.

scala> import org.scanamo._
scala> import org.scanamo.syntax._
scala> import org.scanamo.generic.auto._
 
scala> val client = LocalDynamoDB.client()
scala> import software.amazon.awssdk.services.dynamodb.model.ScalarAttributeType._
scala> val farmersTableResult = LocalDynamoDB.createTable(client)("farmer")("name" -> S)

scala> case class Farm(animals: List[String])
scala> case class Farmer(name: String, age: Long, farm: Farm)
scala> val table = Table[Farmer]("farmer")

scala> val ops = for {
     |   _ <- table.putAll(Set(
     |       Farmer("McDonald", 156L, Farm(List("sheep", "cow"))),
     |       Farmer("Boggis", 43L, Farm(List("chicken")))
     |     ))
     |   mcdonald <- table.get("name" -> "McDonald")
     | } yield mcdonald
scala> Scanamo.exec(client)(ops)
res1: Option[Either[error.DynamoReadError, Farmer]] = Some(Right(Farmer(McDonald,156,Farm(List(sheep, cow)))))

For more details, please see the Scanamo site.

License

Scanamo is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

com.gu

Versions

Version
1.0.0-M8
1.0.0-M7
1.0.0-M6
1.0.0-M5
1.0.0-M4
1.0.0-M3
1.0.0-M2