io.getquill.context.qzio

Members list

Type members

Classlikes

class ResultSetIterator[T](rs: ResultSet, conn: Connection, extractor: (ResultSet, Connection) => T) extends BufferedIterator[T]

In order to allow a ResultSet to be consumed by an Observable, a ResultSet iterator must be created. Since Quill provides a extractor for an individual ResultSet row, a single row can easily be cached in memory. This allows for a straightforward implementation of a hasNext method.

In order to allow a ResultSet to be consumed by an Observable, a ResultSet iterator must be created. Since Quill provides a extractor for an individual ResultSet row, a single row can easily be cached in memory. This allows for a straightforward implementation of a hasNext method.

Attributes

Supertypes
trait BufferedIterator[T]
trait Iterator[T]
trait IterableOnceOps[T, Iterator, Iterator[T]]
trait IterableOnce[T]
class Object
trait Matchable
class Any
Show all
abstract class ZioJdbcContext[+Dialect <: SqlIdiom, +Naming <: NamingStrategy] extends ZioContext[Dialect, Naming], JdbcContextTypes[Dialect, Naming], ProtoContextSecundus[Dialect, Naming], ContextVerbStream[Dialect, Naming], ZioPrepareContext[Dialect, Naming], ZioTranslateContext[Dialect, Naming]

Quill context that executes JDBC queries inside of ZIO. Unlike most other contexts that require passing in a Data Source, this context takes in a java.sql.Connection as a resource dependency which can be provided later (see ZioJdbc for helper methods that assist in doing this).

Quill context that executes JDBC queries inside of ZIO. Unlike most other contexts that require passing in a Data Source, this context takes in a java.sql.Connection as a resource dependency which can be provided later (see ZioJdbc for helper methods that assist in doing this).

The resource dependency itself is just a Has[Connection]. Since this is frequently used The type QIO[T] i.e. Quill-IO has been defined as an alias for ZIO[Has[Connection], SQLException, T].

Since in most JDBC use-cases, a connection-pool datasource i.e. Hikari is used it would actually be much more useful to interact with ZIO[Has[DataSource], SQLException, T]. The extension method .onDataSource in io.getquill.context.ZioJdbc.QuillZioExt will perform this conversion (for even more brevity use onDS which is an alias for this method). {{ import ZioJdbc._ val zioDs = Quill.DataSource.fromPrefix("testPostgresDB") MyZioContext.run(query[Person]).onDataSource.provideCustomLayer(zioDS) }}

If you are using a Plain Scala app however, you will need to manually run it e.g. using zio.Runtime {{ Runtime.default.unsafeRun(MyZioContext.run(query[Person]).ContextTranslateProtoprovideLayer(zioDS)) }}

Note however that the one exception to these cases are the prepare methods where a ZIO[Has[Connection], SQLException, PreparedStatement] is being returned. In those situations the acquire-action-release pattern does not make any sense because the PrepareStatement is only held open while it's host-connection exists.

Attributes

Supertypes
trait ZioTranslateContext[Dialect, Naming]
trait ContextTranslateMacro[Dialect, Naming]
trait ContextTranslateProto[Dialect, Naming]
trait ZioPrepareContext[Dialect, Naming]
trait ContextVerbPrepare[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
abstract class ZioJdbcUnderlyingContext[+Dialect <: SqlIdiom, +Naming <: NamingStrategy] extends ZioContext[Dialect, Naming], JdbcContextVerbExecute[Dialect, Naming], ContextVerbStream[Dialect, Naming], ZioPrepareContext[Dialect, Naming], ZioTranslateContext[Dialect, Naming]

Attributes

Supertypes
trait ZioTranslateContext[Dialect, Naming]
trait ContextTranslateMacro[Dialect, Naming]
trait ContextTranslateProto[Dialect, Naming]
trait ZioPrepareContext[Dialect, Naming]
trait ContextVerbPrepare[Dialect, Naming]
trait JdbcContextVerbExecute[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
class Underlying[N]
class Underlying[N]
class Underlying[N]
class Underlying[N]
class Underlying[N]
class Underlying[N]
trait WithProbing[D, N]
trait WithProbingPrefix[D, N]
Show all
trait ZioPrepareContext[+Dialect <: SqlIdiom, +Naming <: NamingStrategy] extends ZioContext[Dialect, Naming], ContextVerbPrepare[Dialect, Naming]

Attributes

Supertypes
trait ContextVerbPrepare[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
class ZioJdbcContext[Dialect, Naming]
class H2ZioJdbcContext[N]
class ZioJdbcUnderlyingContext[Dialect, Naming]
class Underlying[N]
class Underlying[N]
class Underlying[N]
class Underlying[N]
class Underlying[N]
class Underlying[N]
trait WithProbing[D, N]
trait WithProbingPrefix[D, N]
Show all