SqlMapping

trait SqlMapping[F[_]] extends CirceMapping[F] with SqlModule[F]

An abstract mapping that is backed by a SQL database.

An abstract mapping that is backed by a SQL database.

trait SqlModule[F]
class CirceMapping[F]
class Mapping[F]
trait QueryExecutor[F, Json]
class Object
trait Matchable
class Any

Type members

Classlikes

case class ColumnRef(table: String, column: String, codec: ExistentialCodec, scalaTypeName: String)(pos: SourcePos)

Name of a SQL schema column and its associated codec. Note that ColumnRefs are considered equal if their table and column names are equal.

Name of a SQL schema column and its associated codec. Note that ColumnRefs are considered equal if their table and column names are equal.

Companion
object
object ColumnRef
Companion
class
case class Join(parent: ColumnRef, child: ColumnRef)

A pair of ColumnRefs, representing a SQL join. ColumnRefs have a canonical form.

A pair of ColumnRefs, representing a SQL join. ColumnRefs have a canonical form.

case class LeafCursor(path: List[String], tpe: Type, focus: Any, parent: Option[Cursor], env: Env) extends Cursor
final class MappedQuery(table: String, columns: List[ColumnRef], metas: List[(Boolean, ExistentialCodec)], predicates: List[(List[String], Type, Predicate)], joins: List[Join], conditions: List[Fragment])
Companion
object
object MappedQuery
Companion
class
case class SqlCursor(path: List[String], tpe: Type, focus: Any, mapped: MappedQuery, parent: Option[Cursor], env: Env) extends Cursor
case class SqlField(fieldName: String, columnRef: ColumnRef, key: Boolean, discriminator: Boolean, hidden: Boolean)(pos: SourcePos) extends SqlFieldMapping
sealed trait SqlFieldMapping extends FieldMapping
sealed trait SqlInterfaceMapping extends ObjectMapping
Companion
object
Companion
class
case class SqlJson(fieldName: String, columnRef: ColumnRef)(pos: SourcePos) extends SqlFieldMapping
case class SqlObject(fieldName: String, joins: List[Join])(pos: SourcePos) extends SqlFieldMapping
Companion
object
object SqlObject
Companion
class
case class SqlRoot(fieldName: String, path: List[String], orootTpe: Option[Type], mutation: Mutation)(pos: SourcePos) extends RootMapping
sealed trait SqlUnionMapping extends ObjectMapping
Companion
object
Companion
class
object StagingElaborator extends Phase

Inherited classlikes

case class CirceCursor(path: List[String], tpe: Type, focus: Json, parent: Option[Cursor], env: Env)
Inherited from
CirceMapping
object CirceRoot
Inherited from
CirceMapping
case class CirceRoot(otpe: Option[Type], fieldName: String, root: Json, mutation: Mutation)(pos: SourcePos)
Inherited from
CirceMapping
case class CursorField[T](fieldName: String, f: Cursor => Result[T], encoder: Encoder[T], required: List[String], hidden: Boolean)(pos: SourcePos)
Inherited from
Mapping
object CursorField
Inherited from
Mapping
case class Delegate(fieldName: String, interpreter: Mapping[F], join: (Cursor, Query) => Result[Query])(pos: SourcePos)
Inherited from
Mapping

A codec that has forgotten its type argument.

A codec that has forgotten its type argument.

Inherited from
SqlModule
Inherited from
SqlModule
Inherited from
Mapping
object LeafMapping
Inherited from
Mapping
trait LeafMapping[T]
Inherited from
Mapping
object Mutation
Inherited from
Mapping
case class Mutation(run: (Query, Env) => Stream[F, Result[(Query, Env)]])

Root mappings can perform a mutation prior to constructing the result Cursor. A Mutation may perform a Unit effect and simply return the passed arguments; or it may refine the passed Query and/or Env that will be used to interpret the resulting Cursor.

Root mappings can perform a mutation prior to constructing the result Cursor. A Mutation may perform a Unit effect and simply return the passed arguments; or it may refine the passed Query and/or Env that will be used to interpret the resulting Cursor.

Inherited from
Mapping
Inherited from
Mapping
Inherited from
Mapping
case class PrefixedMapping(tpe: Type, mappings: List[(List[String], ObjectMapping)])(pos: SourcePos)
Inherited from
Mapping
case class PrimitiveMapping(tpe: Type)(pos: SourcePos)
Inherited from
Mapping
Inherited from
Mapping
trait SqlFragment[T]

Typeclass for SQL fragments.

Typeclass for SQL fragments.

Inherited from
SqlModule
Inherited from
Mapping

Inherited types

type Codec[A]

The type of a codec that reads and writes column values of type A.

The type of a codec that reads and writes column values of type A.

Inherited from
SqlModule
type Encoder[-A]

The type of an encoder that writes column values of type A.

The type of an encoder that writes column values of type A.

Inherited from
SqlModule
type Fragment

The type of a fragment of SQL together with any interpolated arguments.

The type of a fragment of SQL together with any interpolated arguments.

Inherited from
SqlModule

Value members

Concrete methods

override def compilerPhases: List[Phase]
Definition Classes
Mapping
override def rootMapping(path: List[String], tpe: Type, fieldName: String): Option[RootMapping]
Definition Classes
Mapping

Inherited methods

def booleanEncoder: Encoder[Boolean]
Inherited from
SqlModule
def compileAndRun(text: String, name: Option[String], untypedVars: Option[Json], introspectionLevel: IntrospectionLevel, env: Env)(sc: Compiler[F, F]): F[Json]
Inherited from
QueryExecutor
def compileAndRunAll(text: String, name: Option[String], untypedVars: Option[Json], introspectionLevel: IntrospectionLevel, env: Env): Stream[F, Json]
Inherited from
Mapping
def compileAndRunOne(text: String, name: Option[String], untypedVars: Option[Json], introspectionLevel: IntrospectionLevel, env: Env)(sc: Compiler[F, F]): F[Json]
Inherited from
Mapping
def doubleEncoder: Encoder[Double]
Inherited from
SqlModule
def fetch(fragment: Fragment, metas: List[(Boolean, ExistentialCodec)]): F[Table]
Inherited from
SqlModule
def fieldMapping(path: List[String], tpe: Type, fieldName: String): Option[FieldMapping]
Inherited from
Mapping
def intEncoder: Encoder[Int]
Inherited from
SqlModule
def leafMapping[T](tpe: Type): Option[LeafMapping[T]]
Inherited from
Mapping
Inherited from
SqlModule
def objectMapping(path: List[String], tpe: Type): Option[ObjectMapping]
Inherited from
Mapping
def rootCursor(path: List[String], rootTpe: Type, fieldName: String, child: Query, env: Env): Stream[F, Result[(Query, Cursor)]]
Inherited from
Mapping
def run(op: Operation, env: Env): Stream[F, Json]
Inherited from
Mapping
def run(query: Query, rootTpe: Type, env: Env): Stream[F, Json]
Inherited from
Mapping
def stringEncoder: Encoder[String]
Inherited from
SqlModule
def toEncoder[A](c: Codec[A]): Encoder[A]

Extract an encoder from a codec.

Extract an encoder from a codec.

Inherited from
SqlModule
def typeMapping(tpe: Type): Option[TypeMapping]
Inherited from
Mapping

Concrete fields

override val interpreter: QueryInterpreter[F]

Inherited fields

lazy val compiler: QueryCompiler
Inherited from
Mapping
lazy val componentElaborator: ComponentElaborator[F]
Inherited from
Mapping
val schema: Schema
Inherited from
Mapping
val selectElaborator: SelectElaborator
Inherited from
Mapping
Inherited from
Mapping

Implicits

Inherited implicits

Inherited from
SqlModule
implicit val M: Monad[F]
Inherited from
Mapping