zio.blocks.sql.query

Members list

Type members

Classlikes

sealed trait JoinKind

Attributes

Companion
object
Source
JoinKind.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Inner
object Left
object JoinKind

Attributes

Companion
trait
Source
JoinKind.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
JoinKind.type
final case class OrderBy(column: String, direction: SortOrder)

Attributes

Source
SqlQuery.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object QueryRenderer

Attributes

Source
QueryRenderer.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object Rel

Attributes

Companion
class
Source
Rel.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Rel.type
final case class Rel[From, To](fromTable: Table[From], fkColumn: String, toTable: Table[To], pkColumn: String)

Relation between two tables: fromTable.fkColumn = toTable.pkColumn.

Relation between two tables: fromTable.fkColumn = toTable.pkColumn.

Attributes

Companion
object
Source
Rel.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait SortOrder

Attributes

Companion
object
Source
SortOrder.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Asc
object Desc
object SortOrder

Attributes

Companion
trait
Source
SortOrder.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
SortOrder.type
object SqlQuery

Attributes

Companion
class
Source
SqlQuery.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
SqlQuery.type
final case class SqlQuery[A]

Immutable query IR starting from a source table.

Immutable query IR starting from a source table.

This is the SELECT builder: joins are validated through typed Rels, rendering is performed by QueryRenderer through Frag.++ composition only, every identifier is validated and double-quoted, and values always bind as ? params.

Alias allocation is deterministic: t0 = source, t1..tN in join order (self-join safe — same Table joined twice gets distinct aliases). Rendering is performed by QueryRenderer and produces a Frag via Frag.++ composition only, using quoted identifiers and dialect placeholders.

Attributes

Companion
object
Source
SqlQuery.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all