QuillBaseContext

io.getquill.jdbczio.QuillBaseContext
trait QuillBaseContext[+Dialect <: SqlIdiom, +Naming <: NamingStrategy] extends ZioContext[Dialect, Naming], JdbcContextTypes[Dialect, Naming], ProtoContextSecundus[Dialect, Naming], ContextVerbStream[Dialect, Naming], ZioTranslateContext[Dialect, Naming]

Attributes

Graph
Supertypes
trait ZioTranslateContext[Dialect, Naming]
trait ContextTranslateMacro[Dialect, Naming]
trait ContextTranslateProto[Dialect, Naming]
trait JdbcContextTypes[Dialect, Naming]
trait Decoders
trait Encoders
trait SqlContext[Dialect, Naming]
trait ZioContext[Dialect, Naming]
trait ContextVerbStream[Dialect, Naming]
trait ProtoStreamContext[Dialect, Naming]
trait Context[Dialect, Naming]
trait Closeable
trait AutoCloseable
trait EncodingDsl
trait LowPriorityImplicits
trait ProtoContextSecundus[Dialect, Naming]
trait RowContext
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Quill[Dialect, Naming]
class H2[N]
class Mysql[N]
class Oracle[N]
class Postgres[N]
class PostgresLite[N]
class SqlServer[N]
class Sqlite[N]
Show all

Members list

Type members

Inherited classlikes

case class BatchGroup(string: String, prepare: List[Prepare])

Attributes

Inherited from:
RowContext
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case class BatchGroupReturning(string: String, returningBehavior: ReturnAction, prepare: List[Prepare])

Attributes

Inherited from:
RowContext
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object InternalApi

Attributes

Inherited from:
Context
Supertypes
class Object
trait Matchable
class Any
case class JdbcDecoder[T](decoder: () => T) extends BaseDecoder[T]

Attributes

Inherited from:
Decoders
Supertypes
trait Serializable
trait Product
trait Equals
trait GenericDecoder[ResultRow, Session, T, Specific]
trait (Int, ResultRow, Session) => T
class Object
trait Matchable
class Any
Show all
case class JdbcEncoder[T](sqlType: Int, encoder: () => T) extends BaseEncoder[T]

Attributes

Inherited from:
Encoders
Supertypes
trait Serializable
trait Product
trait Equals
trait GenericEncoder[T, PrepareRow, Session]
trait (Int, T, PrepareRow, Session) => PrepareRow
class Object
trait Matchable
class Any
Show all
class JdbcNullChecker extends BaseNullChecker

Attributes

Inherited from:
JdbcContextTypes
Supertypes
trait GenericNullChecker[ResultRow, Session]
class Object
trait Matchable
class Any

Types

override type Environment = Any
override type Error = SQLException
override type PrepareRow = PreparedStatement
override type Result[T] = ZIO[Environment, Error, T]
override type ResultRow = ResultSet
override type RunActionResult = Long
override type RunActionReturningResult[T] = T
override type RunBatchActionResult = List[Long]
override type RunBatchActionReturningResult[T] = List[T]
override type RunQueryResult[T] = List[T]
override type RunQuerySingleResult[T] = T
override type Runner = Unit

Future class to hold things like ExecutionContext for Cassandra etc...

Future class to hold things like ExecutionContext for Cassandra etc...

Attributes

override type Session = Connection
override type StreamResult[T] = ZStream[Environment, Error, T]
override type TranslateResult[T] = ZIO[Environment, Error, T]
override type TranslateRunner = Unit

Inherited types

type BaseDecoder[T] = GenericDecoder[ResultRow, Session, T, Specific]

Attributes

Inherited from:
EncodingDsl
type BaseEncoder[T] = GenericEncoder[T, PrepareRow, Session]

Attributes

Inherited from:
EncodingDsl
type BaseNullChecker = GenericNullChecker[ResultRow, Session]

Attributes

Inherited from:
EncodingDsl
type ColumnResolver = GenericColumnResolver[ResultRow]

Attributes

Inherited from:
EncodingDsl
type Decoder[T] = JdbcDecoder[T]

Attributes

Inherited from:
Decoders
type DecoderMethod[T] = (Int, ResultRow, Session) => T

Attributes

Inherited from:
EncodingDsl
type Encoder[T] = JdbcEncoder[T]

Attributes

Inherited from:
Encoders
type EncoderMethod[T] = (Int, T, PrepareRow, Session) => PrepareRow

Attributes

Inherited from:
EncodingDsl
type Extractor[T] = (ResultRow, Session) => T

Attributes

Inherited from:
RowContext
type Index = Int

Attributes

Inherited from:
JdbcContextTypes
override type NullChecker = JdbcNullChecker

Attributes

Inherited from:
JdbcContextTypes
type Prepare = (PrepareRow, Session) => (List[Any], PrepareRow)

Attributes

Inherited from:
RowContext
type RowTyper[T] = GenericRowTyper[ResultRow, T]

Attributes

Inherited from:
EncodingDsl
type RunnerBehavior <: RunnerSummoningBehavior

Attributes

Inherited from:
ContextTranslateMacro

Value members

Abstract methods

def ds: DataSource

Concrete methods

override def close(): Unit

Attributes

Definition Classes
Context -> Closeable -> AutoCloseable
override protected def context: Runner

Attributes

Definition Classes
Context
def executeAction(sql: String, prepare: Prepare)(info: ExecutionInfo, dc: Runner): ZIO[Any, SQLException, Long]
def executeActionReturning[O](sql: String, prepare: Prepare, extractor: () => O, returningBehavior: ReturnAction)(info: ExecutionInfo, dc: Runner): ZIO[Any, SQLException, O]
def executeActionReturningMany[O](sql: String, prepare: Prepare, extractor: () => O, returningBehavior: ReturnAction)(info: ExecutionInfo, dc: Runner): ZIO[Any, SQLException, List[O]]
def executeBatchAction(groups: List[BatchGroup])(info: ExecutionInfo, dc: Runner): ZIO[Any, SQLException, List[Long]]
def executeBatchActionReturning[T](groups: List[BatchGroupReturning], extractor: () => T)(info: ExecutionInfo, dc: Runner): ZIO[Any, SQLException, List[T]]
def executeQuery[T](sql: String, prepare: Prepare, extractor: () => T)(info: ExecutionInfo, dc: Runner): ZIO[Any, SQLException, List[T]]
override def executeQuerySingle[T](sql: String, prepare: Prepare, extractor: () => T)(info: ExecutionInfo, dc: Runner): ZIO[Any, SQLException, T]

Attributes

Definition Classes
ZioContext -> ProtoContextSecundus
inline def run[T](inline quoted: Quoted[Query[T]]): ZIO[Any, SQLException, List[T]]
inline def run[T](inline quoted: Quoted[Query[T]], inline wrap: OuterSelectWrap): ZIO[Any, SQLException, List[T]]
inline def run[T](inline quoted: Quoted[T]): ZIO[Any, SQLException, T]
inline def run[E](inline quoted: Quoted[Action[E]]): ZIO[Any, SQLException, Long]
inline def run[E, T](inline quoted: Quoted[ActionReturning[E, T]]): ZIO[Any, SQLException, T]
inline def run[E, T](inline quoted: Quoted[ActionReturning[E, List[T]]]): ZIO[Any, SQLException, List[T]]
inline def run[I, A <: Action[I] & QAC[I, Nothing]](inline quoted: Quoted[BatchAction[A]], rowsPerBatch: Int): ZIO[Any, SQLException, List[Long]]
inline def run[I, A <: Action[I] & QAC[I, Nothing]](inline quoted: Quoted[BatchAction[A]]): ZIO[Any, SQLException, List[Long]]
inline def run[I, T, A <: Action[I] & QAC[I, T]](inline quoted: Quoted[BatchAction[A]], rowsPerBatch: Int): ZIO[Any, SQLException, List[T]]
inline def run[I, T, A <: Action[I] & QAC[I, T]](inline quoted: Quoted[BatchAction[A]]): ZIO[Any, SQLException, List[T]]
def streamQuery[T](fetchSize: Option[Int], sql: String, prepare: Prepare, extractor: () => T)(info: ExecutionInfo, dc: Runner): ZStream[Any, SQLException, T]
def transaction[R, A](op: ZIO[R, Throwable, A]): ZIO[R, Throwable, A]

Execute instructions in a transaction. For example, to add a Person row to the database and return the contents of the Person table immediately after that:

Execute instructions in a transaction. For example, to add a Person row to the database and return the contents of the Person table immediately after that:

 val a = run(query[Person].insert(Person(...)): ZIO[Has[DataSource], SQLException, Long]
 val b = run(query[Person]): ZIO[Has[DataSource], SQLException, Person]
 transaction(a *> b): ZIO[Has[DataSource], SQLException, Person]

Attributes

override def translateBatchQueryEndpoint(groups: List[BatchGroup], prettyPrint: Boolean)(executionInfo: ExecutionInfo, dc: Runner): TranslateResult[List[String]]

Attributes

Definition Classes
ContextTranslateProto
override def translateQueryEndpoint[T](statement: String, prepare: Prepare, extractor: () => T, prettyPrint: Boolean)(executionInfo: ExecutionInfo, dc: Runner): TranslateResult[String]

Attributes

Definition Classes
ContextTranslateProto

Inherited methods

inline def _streamInternal[T](inline quoted: Quoted[Query[T]], fetchSize: Option[Int]): StreamResult[T]

Internal API that cannot be made private due to how inline functions

Internal API that cannot be made private due to how inline functions

Attributes

Inherited from:
ContextVerbStream
inline def _summonTranslateRunner(): TranslateRunner

Internal API that cannot be made private due to how inline functions

Internal API that cannot be made private due to how inline functions

Attributes

Inherited from:
ContextTranslateMacro
def decoder[T](f: ResultRow => Index => T): JdbcDecoder[T]

Attributes

Inherited from:
Decoders
def decoder[T](d: (Int, ResultRow, Session) => T): JdbcDecoder[T]

Attributes

Inherited from:
Decoders
def encoder[T](sqlType: Int, f: PrepareRow => (Index, T) => Unit): JdbcEncoder[T]

Attributes

Inherited from:
Encoders
def encoder[T](sqlType: Int, f: (Index, T, PrepareRow) => Unit): JdbcEncoder[T]

Attributes

Inherited from:
Encoders
protected def handleSingleResult[T](sql: String, list: List[T]): T

Attributes

Inherited from:
Context
protected def identityExtractor[T]: () => T

Attributes

Inherited from:
RowContext
def idiom: Dialect

Attributes

Inherited from:
ProtoContextSecundus
inline def lift[T](inline runtimeValue: T): T

Attributes

Inherited from:
Context
inline def liftQuery[U <: (Iterable), T](inline runtimeValue: U[T]): Query[T]

Attributes

Inherited from:
Context
protected def mappedBaseDecoder[Base, Mapped](mapped: MappedEncoding[Base, Mapped], decoder: () => Base): () => Mapped

Attributes

Inherited from:
EncodingDsl
protected def mappedBaseEncoder[Mapped, Base](mapped: MappedEncoding[Mapped, Base], encoder: () => Base): () => Mapped

Attributes

Inherited from:
EncodingDsl
def naming: Naming

Attributes

Inherited from:
ProtoContextSecundus
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 parameters

intType

one of java.sql.Types

Attributes

Returns

JDBC type in string form

Inherited from:
JdbcContextTypes
final protected def prepareParam(param: Any): String

Attributes

Inherited from:
ContextTranslateProto
override def push[A, B](result: TranslateResult[A])(f: A => B): TranslateResult[B]

Attributes

Definition Classes
ZioTranslateContext -> ContextTranslateProto
Inherited from:
ZioTranslateContext
override def seq[A](list: List[TranslateResult[A]]): TranslateResult[List[A]]

Attributes

Definition Classes
ZioTranslateContext -> ContextTranslateProto
Inherited from:
ZioTranslateContext
inline def stream[T](inline quoted: Quoted[Query[T]], fetchSize: Int): StreamResult[T]

Attributes

Inherited from:
ContextVerbStream
inline def stream[T](inline quoted: Quoted[Query[T]]): StreamResult[T]

Attributes

Inherited from:
ContextVerbStream
inline def translate[I, T, A <: Action[I] & QAC[I, T]](inline quoted: Quoted[BatchAction[A]], inline prettyPrint: Boolean): TranslateResult[List[String]]

Attributes

Inherited from:
ContextTranslateMacro
inline def translate[I, T, A <: Action[I] & QAC[I, T]](inline quoted: Quoted[BatchAction[A]]): TranslateResult[List[String]]

Attributes

Inherited from:
ContextTranslateMacro
inline def translate[I, A <: Action[I] & QAC[I, Nothing]](inline quoted: Quoted[BatchAction[A]], inline prettyPrint: Boolean): TranslateResult[List[String]]

Attributes

Inherited from:
ContextTranslateMacro
inline def translate[I, A <: Action[I] & QAC[I, Nothing]](inline quoted: Quoted[BatchAction[A]]): TranslateResult[List[String]]

Attributes

Inherited from:
ContextTranslateMacro
inline def translate[E, T](inline quoted: Quoted[ActionReturning[E, T]], inline prettyPrint: Boolean): TranslateResult[String]

Attributes

Inherited from:
ContextTranslateMacro
inline def translate[E, T](inline quoted: Quoted[ActionReturning[E, T]]): TranslateResult[String]

Attributes

Inherited from:
ContextTranslateMacro
inline def translate[E](inline quoted: Quoted[Action[E]], inline prettyPrint: Boolean): TranslateResult[String]

Attributes

Inherited from:
ContextTranslateMacro
inline def translate[E](inline quoted: Quoted[Action[E]]): TranslateResult[String]

Attributes

Inherited from:
ContextTranslateMacro
inline def translate[T](inline quoted: Quoted[T], inline prettyPrint: Boolean): TranslateResult[String]

Attributes

Inherited from:
ContextTranslateMacro
inline def translate[T](inline quoted: Quoted[T]): TranslateResult[String]

Attributes

Inherited from:
ContextTranslateMacro
inline def translate[T](inline quoted: Quoted[Query[T]], inline prettyPrint: Boolean): TranslateResult[String]

Attributes

Inherited from:
ContextTranslateMacro
inline def translate[T](inline quoted: Quoted[Query[T]]): TranslateResult[String]

Attributes

Inherited from:
ContextTranslateMacro
def translateBatchQueryReturningEndpoint(groups: List[BatchGroupReturning], prettyPrint: Boolean)(executionInfo: ExecutionInfo, dc: TranslateRunner): TranslateResult[List[String]]

Attributes

Inherited from:
ContextTranslateProto
override def wrap[T](t: => T): TranslateResult[T]

Attributes

Definition Classes
ZioTranslateContext -> ContextTranslateProto
Inherited from:
ZioTranslateContext

Concrete fields

final lazy val underlying: ZioJdbcContext[Dialect, Naming]

Inherited fields

protected val dateTimeZone: TimeZone

Attributes

Inherited from:
JdbcContextTypes
protected val identityPrepare: Prepare

Attributes

Inherited from:
RowContext

Extensions

Inherited extensions

extension [T](inline dynamicQuery: DynamicEntityQuery[T])
inline def insertValue(value: T): DynamicInsert[T]

Attributes

Inherited from:
Context
inline def updateValue(value: T): DynamicUpdate[T]

Attributes

Inherited from:
Context
extension [T](inline entity: EntityQuery[T])
inline def insertValue(inline value: T): Insert[T]

Attributes

Inherited from:
Context
inline def updateValue(inline value: T): Update[T]

Attributes

Inherited from:
Context
extension [T](inline q: Query[T])
inline def filterByKeys(inline map: Map[String, Any]): 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.

Attributes

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

Attributes

Inherited from:
Context
extension [T](inline quotedEntity: Quoted[EntityQuery[T]])
inline def insertValue(inline value: T): Insert[T]

Attributes

Inherited from:
Context
inline def updateValue(inline value: T): Update[T]

Attributes

Inherited from:
Context

Implicits

Inherited implicits

implicit inline def anyValDecoder[Cls <: AnyVal]: Decoder[Cls]

Attributes

Inherited from:
LowPriorityImplicits
implicit inline def anyValEncoder[Cls <: AnyVal]: Encoder[Cls]

Attributes

Inherited from:
LowPriorityImplicits
implicit val bigDecimalDecoder: JdbcDecoder[BigDecimal]

Attributes

Inherited from:
Decoders
implicit val bigDecimalEncoder: JdbcEncoder[BigDecimal]

Attributes

Inherited from:
Encoders
implicit val booleanDecoder: JdbcDecoder[Boolean]

Attributes

Inherited from:
SqlContext
implicit val booleanEncoder: JdbcEncoder[Boolean]

Attributes

Inherited from:
SqlContext
implicit val byteArrayDecoder: JdbcDecoder[Array[Byte]]

Attributes

Inherited from:
Decoders
implicit val byteArrayEncoder: JdbcEncoder[Array[Byte]]

Attributes

Inherited from:
Encoders
implicit val byteDecoder: JdbcDecoder[Byte]

Attributes

Inherited from:
Decoders
implicit val byteEncoder: JdbcEncoder[Byte]

Attributes

Inherited from:
Encoders
implicit val dateDecoder: JdbcDecoder[Date]

Attributes

Inherited from:
Decoders
implicit val dateEncoder: JdbcEncoder[Date]

Attributes

Inherited from:
Encoders
implicit inline def dec[T]: GenericDecoder[ResultRow, Session, T, Generic]

Attributes

Inherited from:
Context
implicit val doubleDecoder: JdbcDecoder[Double]

Attributes

Inherited from:
Decoders
implicit val doubleEncoder: JdbcEncoder[Double]

Attributes

Inherited from:
Encoders
implicit val floatDecoder: JdbcDecoder[Float]

Attributes

Inherited from:
Decoders
implicit val floatEncoder: JdbcEncoder[Float]

Attributes

Inherited from:
Encoders
implicit val intDecoder: JdbcDecoder[Int]

Attributes

Inherited from:
Decoders
implicit val intEncoder: JdbcEncoder[Int]

Attributes

Inherited from:
Encoders
implicit val localDateDecoder: JdbcDecoder[LocalDate]

Attributes

Inherited from:
SqlContext
implicit val localDateEncoder: JdbcEncoder[LocalDate]

Attributes

Inherited from:
SqlContext
implicit val longDecoder: JdbcDecoder[Long]

Attributes

Inherited from:
Decoders
implicit val longEncoder: JdbcEncoder[Long]

Attributes

Inherited from:
Encoders
implicit def mappedDecoder[I, O](implicit mapped: MappedEncoding[I, O], d: JdbcDecoder[I]): JdbcDecoder[O]

Attributes

Inherited from:
Decoders
implicit override def mappedEncoder[I, O](implicit mapped: MappedEncoding[I, O], e: JdbcEncoder[O]): JdbcEncoder[I]

Attributes

Definition Classes
Encoders -> EncodingDsl
Inherited from:
Encoders

Attributes

Inherited from:
JdbcContextTypes
implicit val nullEncoder: JdbcEncoder[Null]

Attributes

Inherited from:
Encoders
implicit def optionDecoder[T](implicit d: JdbcDecoder[T]): JdbcDecoder[Option[T]]

Attributes

Inherited from:
Decoders
implicit def optionEncoder[T](implicit d: JdbcEncoder[T]): JdbcEncoder[Option[T]]

Attributes

Inherited from:
Encoders
implicit val shortDecoder: JdbcDecoder[Short]

Attributes

Inherited from:
Decoders
implicit val shortEncoder: JdbcEncoder[Short]

Attributes

Inherited from:
Encoders
implicit val sqlDateDecoder: JdbcDecoder[Date]

Attributes

Inherited from:
Decoders
implicit val sqlDateEncoder: JdbcEncoder[Date]

Attributes

Inherited from:
Encoders
implicit val sqlTimeDecoder: JdbcDecoder[Time]

Attributes

Inherited from:
Decoders
implicit val sqlTimeEncoder: JdbcEncoder[Time]

Attributes

Inherited from:
Encoders
implicit val sqlTimestampDecoder: JdbcDecoder[Timestamp]

Attributes

Inherited from:
Decoders
implicit val sqlTimestampEncoder: JdbcEncoder[Timestamp]

Attributes

Inherited from:
Encoders
implicit val stringDecoder: JdbcDecoder[String]

Attributes

Inherited from:
Decoders
implicit val stringEncoder: JdbcEncoder[String]

Attributes

Inherited from:
Encoders
implicit val uuidDecoder: JdbcDecoder[UUID]

Attributes

Inherited from:
SqlContext
implicit val uuidEncoder: JdbcEncoder[UUID]

Attributes

Inherited from:
SqlContext