akka.persistence.r2dbc.internal.postgres.YugabyteQueryDao.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of akka-persistence-r2dbc_3 Show documentation
Show all versions of akka-persistence-r2dbc_3 Show documentation
An Akka Persistence backed by SQL database with R2DBC
/*
* Copyright (C) 2022 - 2023 Lightbend Inc.
*/
package akka.persistence.r2dbc.internal.postgres
import akka.actor.typed.ActorSystem
import akka.annotation.InternalApi
import akka.persistence.r2dbc.R2dbcSettings
import io.r2dbc.spi.ConnectionFactory
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import scala.concurrent.ExecutionContext
/**
* INTERNAL API
*/
@InternalApi
private[r2dbc] final class YugabyteQueryDao(settings: R2dbcSettings, connectionFactory: ConnectionFactory)(implicit
ec: ExecutionContext,
system: ActorSystem[_])
extends PostgresQueryDao(settings, connectionFactory) {
override protected lazy val log: Logger = LoggerFactory.getLogger(classOf[YugabyteQueryDao])
override protected def sliceCondition(minSlice: Int, maxSlice: Int): String = {
s"slice BETWEEN $minSlice AND $maxSlice"
}
}