Skip to content

Releases: thurstonsand/scala-cass

Bugfix when "$" is in String

23 Jul 04:14
Compare
Choose a tag to compare

There was a bug when "$" showed up in a String to be written to Cassandra where calling toString on a query throws an exception.

This release fixes that bug so that it no longer occurs.

Per-Statement Consistency Level

14 Jun 15:17
Compare
Choose a tag to compare

This release allows for per-statement consistency level settings. This looks like

case class Insert(str: String, d: Double)
sSession.insert("mytable", Insert("asdf", 1234.0)).consistency(ConsistencyLevel.ONE)

See the documentation for more information.

Introduce Logging

12 Jun 01:23
Compare
Choose a tag to compare

Start introducing logging. For now, I'm only debug logging whether the ScalaSession gets a cache miss with prepared statements

Fix executeAsync return type

05 Jun 22:12
Compare
Choose a tag to compare

executeAsync returned the type Result[Future[ResultSet]], which is incorrect. It should be [Future[Result[ResultSet]]. This release fixes that. As a side effect, functions that previously threw exceptions now return a Left with Throwable

Bump Versions

05 Jun 21:02
Compare
Choose a tag to compare

This release bumped most of the dependencies.

It also (once again) changed how releases were tagged. Now, there is a single release tag (in this case 3.0.0), suffixed with the version of Cassandra that it supports. The two supported versions are 3.0.0-3.5.0 and 3.0.0-2.1.10.3

Also, no more Java 7 for the 2.1 driver. All releases are based on Java 8.

Finally, I brought docs up to parity.

Scala 2.12 support

03 Mar 15:14
Compare
Choose a tag to compare

upgraded a few dependencies, and now I can compile with 2.12. nice

forProduct$arity

28 Feb 06:27
Compare
Choose a tag to compare

now CCCassFormatEncoder and CCCassFormatDecoder have a forProduct$arity fn. Use like:

case class CustomCC(f1: String, f2: Int)

implicit val encoder: CCCassFormatEncoder[CustomCC] = 
  CCCassFormatEncoder.forProduct2("cassandra_field_1", "cassandra_field_2")(CustomCC.apply)
implicit val decoder: CCCassFormatDecoder[CustomCC] = 
  CCCassFormatDecoder.forProduct2("cassandar_field_1", "cassandra_field_2")(ccc => (ccc.f1, ccc.f2))
  • There is a forProduct$arity for every arity 1-22
  • The first String arguments specify what the names of the columns are in Cassandra
  • The following function provides the encode/decode to the right Scala type for the library

ScalaSession Rehaul

28 Feb 07:04
Compare
Choose a tag to compare

This covers a lot of ground, but the biggest change is in how ScalaSession works

  • rewrite how the ScalaSession creates statements, moving to a flexible query building syntax not unlike the one provided by the Java Cassandra driver.
  • Added Nullable, which allows you to explicitly write a null down to Cassandra
  • moved to sbt-microsites for documentation. This was the bulk of the work, and required...a lot of set up and bumbling through undocumented behavior.
  • rewrite of sbt file to handle the new documentation workflow
  • script to help with documentation workflow
  • improve tests to not restart cassandra every time -- improves testing speed by a lot
  • switched travis to using docker instances -- faster startup

Switch from classOf to TypeToken

17 Jan 22:21
Compare
Choose a tag to compare

Cassandra has 2 ways to tell its runtime what types to pull from the Row. Class and TypeToken. Class can lose type parameter information in nested types (think map<varchar, frozen<set<int>>>), while TypeToken does not. So, I switched to TypeToken

case class encoder/decoder derivation bugfix

10 Nov 17:31
Compare
Choose a tag to compare

this fixes the implementation of 0.(5,6).12 for CCCassFormatEncoder[MyType] by adding a .derive function to supplement it. To take advantage of it, declare a case class and place the cached implicit in the companion object:

case class MyTable(s: String, i: Int, l: Option[Long])
object MyTable {
  implicit val encoder: CCCassFormatEncoder[MyTable] = CCCassFormatEncoder.derive
  implicit val decoder: CCCassFormatDecoder[MyTable] = CCCassFormatDecoder.derive
}