WithProbing

trait WithProbing[D <: SqlIdiom, N <: NamingStrategy] extends ZioJdbcUnderlyingContext[D, N]
trait ZioPrepareContext[D, N]
trait PrepareContext[D, N]
trait JdbcRunContext[D, N]
trait JdbcComposition[D, N]
trait Decoders
trait Encoders
trait SqlContext[D, N]
trait ZioContext[D, N]
trait StreamingContext[D, N]
trait ProtoStreamContext[D, N]
trait Context[D, N]
trait Closeable
trait AutoCloseable
trait EncodingDsl
trait LowPriorityImplicits
trait ProtoContext[D, N]
trait RowContext
class Object
trait Matchable
class Any
trait WithProbingPrefix[D, N]

Type members

Inherited classlikes

case
class BatchGroup(string: String, prepare: List[Prepare])
Inherited from
RowContext
case
class BatchGroupReturning(string: String, returningBehavior: ReturnAction, prepare: List[Prepare])
Inherited from
RowContext
case
class JdbcDecoder[T](decoder: () => T)
Inherited from
Decoders
case
class JdbcEncoder[T](sqlType: Int, encoder: () => T)
Inherited from
Encoders

Inherited types

type BaseDecoder[T] = GenericDecoder[ResultRow, Session, T, Specific]
Inherited from
EncodingDsl
type BaseEncoder[T] = GenericEncoder[T, PrepareRow, Session]
Inherited from
EncodingDsl
type ColumnResolver = GenericColumnResolver[ResultRow]
Inherited from
EncodingDsl
type Decoder[T] = JdbcDecoder[T]
Inherited from
Decoders
type DecoderMethod[T] = (Int, ResultRow, Session) => T
Inherited from
EncodingDsl
type Encoder[T] = JdbcEncoder[T]
Inherited from
Encoders
type EncoderMethod[T] = (Int, T, PrepareRow, Session) => PrepareRow
Inherited from
EncodingDsl
override
type Environment = Has[Session]
override
type Error = SQLException
type Extractor[T] = (ResultRow, Session) => T
Inherited from
RowContext
type Index = Int
Inherited from
JdbcComposition
type Prepare = (PrepareRow, Session) => (List[Any], PrepareRow)
Inherited from
RowContext
Inherited from
ZioPrepareContext
Inherited from
ZioPrepareContext
override
type PrepareRow = PreparedStatement
override
type Result[T] = ZIO[Environment, Error, T]
Inherited from
ZioContext
override
type ResultRow = ResultSet
type RowTyper[T] = GenericRowTyper[ResultRow, T]
Inherited from
EncodingDsl
override
type RunActionResult = Long
override
override
type RunBatchActionResult = List[Long]
override
override
type RunQueryResult[T] = List[T]
Inherited from
JdbcRunContext
override
Inherited from
JdbcRunContext
override
type Runner = Unit
type RunnerBehavior <: RunnerSummoningBehavior
Inherited from
Context
override
type Session = Connection
Inherited from
ZioPrepareContext
override
type StreamResult[T] = ZStream[Environment, Error, T]
Inherited from
ZioContext

Value members

Abstract methods

def probingConfig: Config

Concrete methods

override
def probingDataSource: Option[DataSource]
Definition Classes

Inherited methods

override
def close(): Unit

ZIO Contexts do not managed DB connections so this is a no-op

ZIO Contexts do not managed DB connections so this is a no-op

Definition Classes
ZioJdbcUnderlyingContext -> Context -> Closeable -> AutoCloseable
Inherited from
ZioJdbcUnderlyingContext
override protected
Definition Classes
Inherited from
ZioJdbcUnderlyingContext
def decoder[T](f: ResultRow => Index => T): JdbcDecoder[T]
Inherited from
Decoders
def decoder[T](d: (Int, ResultRow, Session) => T): JdbcDecoder[T]
Inherited from
Decoders
def encoder[T](sqlType: Int, f: PrepareRow => (Index, T) => Unit): JdbcEncoder[T]
Inherited from
Encoders
def encoder[T](sqlType: Int, f: (Index, T, PrepareRow) => Unit): JdbcEncoder[T]
Inherited from
Encoders
override
def executeAction(sql: String, prepare: Prepare)(info: ExecutionInfo, dc: Runner): QCIO[Long]
Definition Classes
ZioJdbcUnderlyingContext -> JdbcRunContext -> ProtoContext
Inherited from
ZioJdbcUnderlyingContext
override
def executeActionReturning[O](sql: String, prepare: Prepare, extractor: () => O, returningBehavior: ReturnAction)(info: ExecutionInfo, dc: Runner): QCIO[O]
Definition Classes
ZioJdbcUnderlyingContext -> JdbcRunContext -> ProtoContext
Inherited from
ZioJdbcUnderlyingContext
override
def executeBatchAction(groups: List[BatchGroup])(info: ExecutionInfo, dc: Runner): QCIO[List[Long]]
Definition Classes
ZioJdbcUnderlyingContext -> JdbcRunContext -> ProtoContext
Inherited from
ZioJdbcUnderlyingContext
override
def executeBatchActionReturning[T](groups: List[BatchGroupReturning], extractor: () => T)(info: ExecutionInfo, dc: Runner): QCIO[List[T]]
Definition Classes
ZioJdbcUnderlyingContext -> JdbcRunContext -> ProtoContext
Inherited from
ZioJdbcUnderlyingContext
override
def executeQuery[T](sql: String, prepare: Prepare, extractor: () => T)(info: ExecutionInfo, dc: Runner): QCIO[List[T]]
Definition Classes
ZioJdbcUnderlyingContext -> JdbcRunContext -> ZioContext -> ProtoContext
Inherited from
ZioJdbcUnderlyingContext
override
def executeQuerySingle[T](sql: String, prepare: Prepare, extractor: () => T)(info: ExecutionInfo, dc: Runner): QCIO[T]
Definition Classes
ZioJdbcUnderlyingContext -> JdbcRunContext -> ZioContext -> ProtoContext
Inherited from
ZioJdbcUnderlyingContext
protected
def handleSingleResult[T](list: List[T]): T
Inherited from
Context
protected
def handleSingleWrappedResult[T](list: Result[List[T]]): Result[T]
Inherited from
JdbcRunContext
def idiom: D
Inherited from
ProtoContext
inline
def lift[T](inline runtimeValue: T): T
Inherited from
Context
inline
def liftQuery[U <: ([_] =>> Iterable[_]), T](inline runtimeValue: U[T]): Query[T]
Inherited from
Context
protected
def mappedBaseDecoder[Base, Mapped](mapped: MappedEncoding[Base, Mapped], decoder: () => Base): () => Mapped
Inherited from
EncodingDsl
protected
def mappedBaseEncoder[Mapped, Base](mapped: MappedEncoding[Mapped, Base], encoder: () => Base): () => Mapped
Inherited from
EncodingDsl
def naming: N
Inherited from
ProtoContext
def parseJdbcType(intType: Int): String

Parses instances of java.sql.Types to string form so it can be used in creation of sql arrays. Some databases does not support each of generic types, hence it's welcome to override this method and provide alternatives to non-existent types.

Parses instances of java.sql.Types to string form so it can be used in creation of sql arrays. Some databases does not support each of generic types, hence it's welcome to override this method and provide alternatives to non-existent types.

Value Params
intType

one of java.sql.Types

Returns

JDBC type in string form

Inherited from
JdbcComposition
@targetName("runPrepareBatchAction")
inline
def prepare[I, A <: Action[I] & QAC[I, Nothing]](inline quoted: Quoted[BatchAction[A]]): PrepareBatchActionResult
Inherited from
PrepareContext
@targetName("runPrepareAction")
inline
def prepare[E](inline quoted: Quoted[Action[E]]): PrepareActionResult
Inherited from
PrepareContext
@targetName("runPrepareQuerySingle")
inline
def prepare[T](inline quoted: Quoted[T]): PrepareQueryResult
Inherited from
PrepareContext
@targetName("runPrepareQuery")
inline
def prepare[T](inline quoted: Quoted[Query[T]]): PrepareQueryResult
Inherited from
PrepareContext
override
def prepareAction(sql: String, prepare: Prepare)(info: ExecutionInfo, dc: Runner): QCIO[PreparedStatement]
Definition Classes
Inherited from
ZioJdbcUnderlyingContext
override
def prepareBatchAction(groups: List[BatchGroup])(info: ExecutionInfo, dc: Runner): QCIO[List[PreparedStatement]]
Definition Classes
Inherited from
ZioJdbcUnderlyingContext
override
def prepareQuery(sql: String, prepare: Prepare)(info: ExecutionInfo, dc: Runner): QCIO[PreparedStatement]
Definition Classes
Inherited from
ZioJdbcUnderlyingContext
def prepareSingle(sql: String, prepare: Prepare)(info: ExecutionInfo, dc: Runner): QCIO[PreparedStatement]

Execute SQL on connection and return prepared statement. Closes the statement in a bracket.

Execute SQL on connection and return prepared statement. Closes the statement in a bracket.

Inherited from
ZioPrepareContext
protected
def prepareStatementForStreaming(sql: String, conn: Connection, fetchSize: Option[Int]): PreparedStatement

Override to enable specific vendor options needed for streaming

Override to enable specific vendor options needed for streaming

Inherited from
ZioJdbcUnderlyingContext
protected
def prepareWithReturning(sql: String, conn: Connection, returningBehavior: ReturnAction): PreparedStatement
Inherited from
JdbcRunContext
override
def push[A, B](result: ZIO[Has[Connection], SQLException, A])(f: A => B): ZIO[Has[Connection], SQLException, B]
Definition Classes
ZioJdbcUnderlyingContext -> JdbcRunContext
Inherited from
ZioJdbcUnderlyingContext
@targetName("runBatchActionReturning")
inline
def run[I, T, A <: Action[I] & QAC[I, T]](inline quoted: Quoted[BatchAction[A]]): Result[List[T]]
Inherited from
Context
@targetName("runBatchAction")
inline
def run[I, A <: Action[I] & QAC[I, Nothing]](inline quoted: Quoted[BatchAction[A]]): Result[RunBatchActionResult]
Inherited from
Context
@targetName("runActionReturning")
inline
def run[E, T](inline quoted: Quoted[ActionReturning[E, T]]): Result[RunActionReturningResult[T]]
Inherited from
Context
@targetName("runAction")
inline
def run[E](inline quoted: Quoted[Action[E]]): Result[RunActionResult]
Inherited from
Context
@targetName("runQuerySingle")
inline
def run[T](inline quoted: Quoted[T]): Result[RunQuerySingleResult[T]]
Inherited from
Context
@targetName("runQuery")
inline
def run[T](inline quoted: Quoted[Query[T]], inline wrap: OuterSelectWrap): Result[List[T]]
Inherited from
Context
@targetName("runQueryDefault")
inline
def run[T](inline quoted: Quoted[Query[T]]): Result[List[T]]
Inherited from
Context
override
def seq[A](f: List[ZIO[Has[Connection], SQLException, A]]): ZIO[Has[Connection], SQLException, List[A]]
Definition Classes
ZioJdbcUnderlyingContext -> JdbcRunContext
Inherited from
ZioJdbcUnderlyingContext
@targetName("streamQueryWithFetchSize")
inline
def stream[T](inline quoted: Quoted[Query[T]], fetchSize: Int): StreamResult[T]
Inherited from
StreamingContext
@targetName("streamQuery")
inline
def stream[T](inline quoted: Quoted[Query[T]]): StreamResult[T]
Inherited from
StreamingContext
def streamQuery[T](fetchSize: Option[Int], sql: String, prepare: Prepare, extractor: () => T)(info: ExecutionInfo, dc: Runner): QCStream[T]
def transaction[R <: Has[Connection], A](f: ZIO[R, Throwable, A]): ZIO[R, Throwable, A]
protected
def withConnection[T](f: Connection => Result[T]): Result[T]
override protected
def withConnectionWrapped[T](f: Connection => T): QCIO[T]
Definition Classes
ZioJdbcUnderlyingContext -> JdbcRunContext
Inherited from
ZioJdbcUnderlyingContext
override
def wrap[T](t: => T): ZIO[Has[Connection], SQLException, T]
Definition Classes
ZioJdbcUnderlyingContext -> JdbcRunContext
Inherited from
ZioJdbcUnderlyingContext

Inherited fields

protected
val dateTimeZone: TimeZone
Inherited from
JdbcComposition
Inherited from
RowContext
protected
val identityPrepare: Prepare
Inherited from
RowContext

Extensions

Inherited extensions

extension [T](q: Query[T])
inline
def filterByKeys(inline map: Map[String, String]): Query[T]

When using this with FilterColumns make sure it comes FIRST. Otherwise the columns are you filtering may have been nullified in the SQL before the filteration has actually happened.

When using this with FilterColumns make sure it comes FIRST. Otherwise the columns are you filtering may have been nullified in the SQL before the filteration has actually happened.

Inherited from
Context
inline
def filterColumns(inline columns: List[String]): Query[T]
Inherited from
Context

Implicits

Inherited implicits

implicit inline
def anyValDecoder[Cls <: AnyVal]: JdbcDecoder[Cls]
Inherited from
LowPriorityImplicits
implicit inline
def anyValEncoder[Cls <: AnyVal]: JdbcEncoder[Cls]
Inherited from
LowPriorityImplicits
implicit
Inherited from
Decoders
implicit
Inherited from
Encoders
implicit
Inherited from
SqlContext
implicit
Inherited from
SqlContext
implicit
val byteArrayDecoder: JdbcDecoder[Array[Byte]]
Inherited from
Decoders
implicit
val byteArrayEncoder: JdbcEncoder[Array[Byte]]
Inherited from
Encoders
implicit
Inherited from
Decoders
implicit
Inherited from
Encoders
implicit
Inherited from
Decoders
implicit
Inherited from
Encoders
implicit inline
def dec[T]: GenericDecoder[ResultRow, Session, T, Generic]
Inherited from
Context
implicit
Inherited from
Decoders
implicit
Inherited from
Encoders
implicit
Inherited from
Decoders
implicit
Inherited from
Encoders
implicit
Inherited from
Decoders
implicit
Inherited from
Encoders
implicit
Inherited from
Decoders
implicit
Inherited from
Encoders
implicit
val localDateTimeDecoder: JdbcDecoder[LocalDateTime]
Inherited from
Decoders
implicit
val localDateTimeEncoder: JdbcEncoder[LocalDateTime]
Inherited from
Encoders
implicit
Inherited from
Decoders
implicit
Inherited from
Encoders
implicit
def mappedDecoder[I, O](implicit mapped: MappedEncoding[I, O], d: JdbcDecoder[I]): JdbcDecoder[O]
Inherited from
Decoders
implicit override
def mappedEncoder[I, O](implicit mapped: MappedEncoding[I, O], e: JdbcEncoder[O]): JdbcEncoder[I]
Definition Classes
Encoders -> EncodingDsl
Inherited from
Encoders
implicit
def optionDecoder[T](implicit d: JdbcDecoder[T]): JdbcDecoder[Option[T]]
Inherited from
Decoders
implicit
def optionEncoder[T](implicit d: JdbcEncoder[T]): JdbcEncoder[Option[T]]
Inherited from
Encoders
implicit
Inherited from
Decoders
implicit
Inherited from
Encoders
implicit
Inherited from
Decoders
implicit
Inherited from
Encoders
implicit
Inherited from
SqlContext
implicit
Inherited from
SqlContext