Object

doobie.free

ref

Related Doc: package free

Permalink

object ref

Algebra and free monad for primitive operations over a java.sql.Ref. 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.

RefIO is a free monad that must be run via an interpreter, most commonly via natural transformation of its underlying algebra RefOp to another monad via Free.runFC.

The library provides a natural transformation to Kleisli[M, Ref, 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: RefIO[Foo] = ...

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

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

Type Members

  1. type RefIO[A] = Free[[x]Coyoneda[RefOp, x], A]

    Permalink

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

  2. implicit class RefIOOps[A] extends AnyRef

    Permalink

    Syntax for RefIO.

  3. sealed trait RefOp[A] extends AnyRef

    Permalink

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

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. implicit val CaptureRefIO: Capture[RefIO]

    Permalink

    Capture instance for RefIO.

  5. implicit val CatchableRefIO: Catchable[RefIO]

    Permalink

    Catchable instance for RefIO.

  6. implicit val MonadRefIO: Monad[RefIO]

    Permalink

    Monad instance for RefIO (can't be inferred).

  7. object RefOp

    Permalink

    Module of constructors for RefOp.

    Module of constructors for RefOp. These are rarely useful outside of the implementation; prefer the smart constructors provided by the ref module.

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def attempt[A](a: RefIO[A]): RefIO[\/[Throwable, A]]

    Permalink

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

  10. def clone(): AnyRef

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

    Permalink

    Non-strict unit for capturing effects.

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. val getBaseTypeName: RefIO[String]

    Permalink

  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def getObject(a: Map[String, Class[_]]): RefIO[AnyRef]

    Permalink

  18. val getObject: RefIO[AnyRef]

    Permalink

  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. def interpK[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[RefOp, [γ]Kleisli[M, Ref, γ]]

    Permalink

    Natural transformation from RefOp to Kleisli for the given M, consuming a java.sql.Ref.

  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. def lift[Op[_], A, J](j: J, action: FreeC[Op, A])(implicit mod: Aux[Op, J]): RefIO[A]

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def raw[A](f: (Ref) ⇒ A): RefIO[A]

    Permalink

    Backdoor for arbitrary computations on the underlying Ref.

  27. def setObject(a: AnyRef): RefIO[Unit]

    Permalink

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

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. def trans[M[_]](c: Ref)(implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[RefIO, M]

    Permalink

    Natural transformation from RefIO to M, given a java.sql.Ref.

  31. def transK[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[RefIO, [γ]Kleisli[M, Ref, γ]]

    Permalink

    Natural transformation from RefIO to Kleisli for the given M, consuming a java.sql.Ref.

  32. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Algebra

Constructors (Lifting)

Constructors (Primitives)

Typeclass Instances

Ungrouped