Releases: karimagnusson/kuzminki-pekko
Releases · karimagnusson/kuzminki-pekko
Version 0.9.3 for Pekko and Akka.
Version 0.9.3 for Pekko and Akka.
Sbt
// available for Scala 2.13 and Scala 3
// Pekko
libraryDependencies += "io.github.karimagnusson" %% "kuzminki-ec-pekko" % "0.9.3"
// Akka
libraryDependencies += "io.github.karimagnusson" %% "kuzminki-ec-akka" % "0.9.3"Version 0.9.1 for Kuzminki below 0.9.5-RC3
Version 0.9.1
Use this version with Kuzminki below 0.9.5-RC3
import kuzminki.pekko.stream._
sql
.select(user)
.cols2(t => (
t.name,
t.email
))
.all
.orderBy(_.name.asc)
.asSource
.map(doSmothing)
.runWith(mySink)
// By default the source will fetch 100 rows each time.
// To fetch a different number of rows: .asSourceBatch(1000)Query as Sink.
import kuzminki.akka.stream._
val insertUserStm = sql
.insert(user)
.cols2(t => (
t.name,
t.email
))
.cache
Source(someData)
.map(doSmothing)
.runWith(insertUserStm.asSink)
// To insert in batches of 100
Source(someData)
.map(doSmothing)
.grouped(100) // insert 100 in each transaction.
.runWith(insertUserStm.asBatchSink)