Object

doobie.free

clob

Related Doc: package free

Permalink

object clob extends ClobIOInstances

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

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

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

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

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

Type Members

  1. type ClobIO[A] = Free[ClobOp, A]

    Permalink

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

  2. implicit class ClobIOOps[A] extends AnyRef

    Permalink

    Syntax for ClobIO.

  3. sealed trait ClobOp[A] extends AnyRef

    Permalink

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

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 CaptureClobIO: Capture[ClobIO]

    Permalink

    Capture instance for ClobIO.

  5. implicit val CatchableClobIO: Catchable[ClobIO]

    Permalink

    Catchable instance for ClobIO.

  6. object ClobOp

    Permalink

    Module of constructors for ClobOp.

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

  7. final def asInstanceOf[T0]: T0

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

    Permalink

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

  9. def clone(): AnyRef

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

    Permalink

    Non-strict unit for capturing effects.

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. val free: ClobIO[Unit]

    Permalink

  15. val getAsciiStream: ClobIO[InputStream]

    Permalink

  16. def getCharacterStream(a: Long, b: Long): ClobIO[Reader]

    Permalink

  17. val getCharacterStream: ClobIO[Reader]

    Permalink

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

    Permalink
    Definition Classes
    AnyRef → Any
  19. def getSubString(a: Long, b: Int): ClobIO[String]

    Permalink

  20. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  21. def interpK[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[ClobOp, [γ$3$]Kleisli[M, Clob, γ$3$]]

    Permalink

    Natural transformation from ClobOp to Kleisli for the given M, consuming a java.sql.Clob.

  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. val length: ClobIO[Long]

    Permalink

  24. def lift[Op[_], A, J](j: J, action: Free[Op, A])(implicit mod: Aux[Op, J]): ClobIO[A]

    Permalink

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  28. def position(a: String, b: Long): ClobIO[Long]

    Permalink

  29. def position(a: Clob, b: Long): ClobIO[Long]

    Permalink

  30. def raw[A](f: (Clob) ⇒ A): ClobIO[A]

    Permalink

    Backdoor for arbitrary computations on the underlying Clob.

  31. def setAsciiStream(a: Long): ClobIO[OutputStream]

    Permalink

  32. def setCharacterStream(a: Long): ClobIO[Writer]

    Permalink

  33. def setString(a: Long, b: String, c: Int, d: Int): ClobIO[Int]

    Permalink

  34. def setString(a: Long, b: String): ClobIO[Int]

    Permalink

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

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

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

    Permalink

    Natural transformation from ClobIO to M, given a java.sql.Clob.

  38. def transK[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[ClobIO, [γ$4$]Kleisli[M, Clob, γ$4$]]

    Permalink

    Natural transformation from ClobIO to Kleisli for the given M, consuming a java.sql.Clob.

  39. def truncate(a: Long): ClobIO[Unit]

    Permalink

  40. final def wait(): Unit

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

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

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

Inherited from ClobIOInstances

Inherited from AnyRef

Inherited from Any

Algebra

Constructors (Lifting)

Constructors (Primitives)

Typeclass Instances

Ungrouped