Skip to content

sebtomba/dynamodb-scala

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scala Helper/Mapper for dynamodb

Setup
resolvers += "dynamodb-scala" at "http://dl.bintray.com/onzo/maven"
libraryDependencies += "com.onzo" %% "dynamodb-scala" % "0.4.0"

// This burdens the users of this library  with a shapeless dependency (and specific version)
// for shapeless snapshot 2.3.0
resolvers += "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
Example
  implicit object forumSerializer extends Table[Forum](Forum.tableName) {

    import shapeless._

    def name = PrimaryKey[String]("Name")

    def category = Key[String]("Category")

    def threads = Key[Long]("Threads")

    def messages = Key[Long]("Messages")

    def views = Key[Long]("Views")

    override val * = (name :: category :: threads :: messages :: views :: HNil).as[Forum]
  }

more examples in test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 97.9%
  • Shell 2.1%