Scala-Cass is a library that makes working with the Cassandra Java driver in Scala better. It provides type class instances for all of Cassandra’s types to Scala types so that you can get a retrieve data from the db easier. It also uses the Shapeless library to provide type class instances for case classes so you can read and write data more conveniently.

Getting Scala-Cass

you can find it on bintray.

Supports Scala 2.10, Scala 2.11, and Scala 2.12 and

  • Cassandra 2.1 on Java 8
  • Cassandra 3.0+ on Java 8

SBT

Add the jcenter resolver

resolvers += Resolver.jcenterRepo

Add the appropriate version of the library

Cassandra 3.0+
libraryDependencies += "com.github.thurstonsand" %% "scala-cass" % "3.2.1-3.5.0"
Cassandra 2.1
libraryDependencies += "com.github.thurstonsand" %% "scala-cass" % "3.2.1-2.1.10.3"

Maven

Add the jcenter resolver

<repositories>
    <repository>
        <id>central</id>
        <name>bintray</name>
        <url>http://jcenter.bintray.com</url>
    </repository>
</repositories>

Pick a version

Cassandra 3.0+
<properties>
    <scalaCass.version>3.2.1-3.5.0</scalaCassVersion>
</properties>
Cassandra 2.1
<properties>
    <scalaCass.version>3.2.1-2.1.10.3</scalaCassVersion>
</properties>

Include the repo

<dependency>
  <groupId>com.github.thurstonsand</groupId>
  <artifactId>scala-cass_${scala.version}</artifactId>
  <version>${scalaCass.version}</version>
  <type>pom</type>
</dependency>