Add values to InsertBuilder
New additions
We added .values
to InsertBuilder to help inserting a lot of columns without having to repeatedly type value
final case class Person(id: Int, name: Option[String], age: Option[Int])
object Person {
val tableName = "person"
val Id = "id"
val Name = "name"
val Age = "age"
val AllColumns: NonEmptyChunk[String] = NonEmptyChunk(Id, Name, Age)
def insert(in: Person): CQL[MutationResult] =
InsertBuilder(tableName)
.values(
Id -> in.id,
Name -> in.name,
Age -> in.age
)
.ifNotExists
.build
}
What's Changed
- Update scala-collection-compat to 2.7.0 by @scala-steward in #44
- Update magnolia to 1.1.2 by @scala-steward in #43
- Add values function to ease insertion of multiple columns worth of data by @mihaisoloi in #42
Full Changelog: 0.5.4...0.5.5