doobie.free

sqldata

object sqldata

Algebra and free monad for primitive operations over a java.sql.SQLData. This is a low-level API that exposes lifecycle-managed JDBC objects directly and is intended mainly for library developers. End users will prefer a safer, higher-level API such as that provided in the doobie.hi package.

SQLDataIO is a free monad that must be run via an interpreter, most commonly via natural transformation of its underlying algebra SQLDataOp to another monad via Free#foldMap.

The library provides a natural transformation to Kleisli[M, SQLData, A] for any exception-trapping (Catchable) and effect-capturing (Capture) monad M. Such evidence is provided for Task, IO, and stdlib Future; and transK[M] is provided as syntax.

// An action to run
val a: SQLDataIO[Foo] = ...

// A JDBC object
val s: SQLData = ...

// Unfolding into a Task
val ta: Task[A] = a.transK[Task].run(s)
Source
sqldata.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By inheritance
Inherited
  1. sqldata
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type SQLDataIO[A] = Free[SQLDataOp, A]

    Free monad over a free functor of SQLDataOp; abstractly, a computation that consumes a java.sql.SQLData and produces a value of type A.

  2. implicit class SQLDataIOOps[A] extends AnyRef

    Syntax for SQLDataIO.

  3. sealed trait SQLDataOp[A] extends AnyRef

    Sum type of primitive operations over a java.sql.SQLData.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. implicit val CaptureSQLDataIO: Capture[SQLDataIO]

    Capture instance for SQLDataIO.

  7. implicit val CatchableSQLDataIO: Catchable[SQLDataIO]

    Catchable instance for SQLDataIO.

  8. object SQLDataOp

    Module of constructors for SQLDataOp.

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def attempt[A](a: SQLDataIO[A]): SQLDataIO[\/[Throwable, A]]

    Lift a SQLDataIO[A] into an exception-capturing SQLDataIO[Throwable \/ A].

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def delay[A](a: ⇒ A): SQLDataIO[A]

    Non-strict unit for capturing effects.

  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. val getSQLTypeName: SQLDataIO[String]

  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. def interpK[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[SQLDataOp, [γ]Kleisli[M, SQLData, γ]]

    Natural transformation from SQLDataOp to Kleisli for the given M, consuming a java.sql.SQLData.

  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. def lift[Op[_], A, J](j: J, action: Free[Op, A])(implicit mod: Aux[Op, J]): SQLDataIO[A]

    Lift a different type of program that has a default Kleisli interpreter.

  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. def raw[A](f: (SQLData) ⇒ A): SQLDataIO[A]

    Backdoor for arbitrary computations on the underlying SQLData.

  26. def readSQL(a: SQLInput, b: String): SQLDataIO[Unit]

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def toString(): String

    Definition Classes
    AnyRef → Any
  29. def trans[M[_]](c: SQLData)(implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[SQLDataIO, M]

    Natural transformation from SQLDataIO to M, given a java.sql.SQLData.

  30. def transK[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[SQLDataIO, [γ]Kleisli[M, SQLData, γ]]

    Natural transformation from SQLDataIO to Kleisli for the given M, consuming a java.sql.SQLData.

  31. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. def writeSQL(a: SQLOutput): SQLDataIO[Unit]

Inherited from AnyRef

Inherited from Any

Algebra

Constructors (Lifting)

Constructors (Primitives)

Typeclass Instances

Ungrouped