trait Query[A, B] extends AnyRef
A query parameterized by some input type A
yielding values of type B
.
We define here the core operations that are needed. Additional operations
are provided on Query0 which is the residual query after applying an
A
. This is the type constructed by the sql
interpolator.
- Self Type
- Query[A, B]
- Source
- query.scala
- Grouped
- Alphabetic
- By Inheritance
- Query
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def pos: Option[Pos]
An optional Pos indicating the source location where this Query was constructed.
An optional Pos indicating the source location where this Query was constructed. This is used only for diagnostic purposes.
- implicit abstract val read: Read[B]
- Attributes
- protected
- abstract def sql: String
The SQL string.
- implicit abstract val write: Write[A]
- Attributes
- protected
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def accumulate[F[_]](a: A)(implicit arg0: Alternative[F]): free.connection.ConnectionIO[F[B]]
Apply the argument
a
to construct a program in ConnectionIO yielding anF[B]
accumulated viaMonadPlus
append.Apply the argument
a
to construct a program in ConnectionIO yielding anF[B]
accumulated viaMonadPlus
append. This method is more general but less efficient thanto
. - def analysis: free.connection.ConnectionIO[Analysis]
Program to construct an analysis of this query's SQL statement and asserted parameter and column types.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def contramap[C](f: (C) => A): Query[C, B]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def inspect[R](a: A)(f: (String, free.preparedstatement.PreparedStatementIO[Unit]) => free.connection.ConnectionIO[R]): free.connection.ConnectionIO[R]
Program to construct an inspection of the query.
Program to construct an inspection of the query. Given arguments
a
, callsf
with the SQL representation of the query and a statement with all arguments set. Returns the result of theConnectionIO
program constructed. - final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[C](f: (B) => C): Query[A, C]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nel(a: A): free.connection.ConnectionIO[NonEmptyList[B]]
Apply the argument
a
to construct a program in ConnectionIO yielding anNonEmptyList[B]
and raising an exception if the resultset does not have at least one row.Apply the argument
a
to construct a program in ConnectionIO yielding anNonEmptyList[B]
and raising an exception if the resultset does not have at least one row. See alsounique
. - final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def option(a: A): free.connection.ConnectionIO[Option[B]]
Apply the argument
a
to construct a program in ConnectionIO yielding an optionalB
and raising an exception if the resultset has more than one row.Apply the argument
a
to construct a program in ConnectionIO yielding an optionalB
and raising an exception if the resultset has more than one row. See alsounique
. - def outputAnalysis: free.connection.ConnectionIO[Analysis]
Program to construct an analysis of this query's SQL statement and result set column types.
- def stream(a: A): Stream[free.connection.ConnectionIO, B]
Apply the argument
a
to construct aStream
withDefaultChunkSize
, with effect type ConnectionIO yielding elements of typeB
. - def streamWithChunkSize(a: A, chunkSize: Int): Stream[free.connection.ConnectionIO, B]
Apply the argument
a
to construct aStream
with the given chunking factor, with effect type ConnectionIO yielding elements of typeB
. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def to[F[_]](a: A)(implicit f: Factory[B, F[B]]): free.connection.ConnectionIO[F[B]]
Apply the argument
a
to construct a program in ConnectionIO yielding anF[B]
.Apply the argument
a
to construct a program in ConnectionIO yielding anF[B]
. This is the fastest way to accumulate a collection. - def toFragment(a: A): fragment.Fragment
Convert this Query to a Fragment.
- def toMap[K, V](a: A)(implicit ev: =:=[B, (K, V)], f: Factory[(K, V), Map[K, V]]): free.connection.ConnectionIO[Map[K, V]]
Apply the argument
a
to construct a program in ConnectionIO yielding anMap[(K, V)]
accumulated via the providedCanBuildFrom
.Apply the argument
a
to construct a program in ConnectionIO yielding anMap[(K, V)]
accumulated via the providedCanBuildFrom
. This is the fastest way to accumulate a collection. this function can call only when B is (K, V). - def toQuery0(a: A): Query0[B]
Apply an argument, yielding a residual Query0.
Apply an argument, yielding a residual Query0.
- Annotations
- @SuppressWarnings()
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unique(a: A): free.connection.ConnectionIO[B]
Apply the argument
a
to construct a program in ConnectionIO yielding a uniqueB
and raising an exception if the resultset does not have exactly one row.Apply the argument
a
to construct a program in ConnectionIO yielding a uniqueB
and raising an exception if the resultset does not have exactly one row. See alsooption
. - final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated