doobie.free

blob

object blob

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

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

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

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

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

Type Members

  1. type BlobIO[A] = Free[BlobOp, A]

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

  2. implicit class BlobIOOps[A] extends AnyRef

    Syntax for BlobIO.

  3. sealed trait BlobOp[A] extends AnyRef

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

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. object BlobOp

    Module of constructors for BlobOp.

  7. implicit val CaptureBlobIO: Capture[BlobIO]

    Capture instance for BlobIO.

  8. implicit val CatchableBlobIO: Catchable[BlobIO]

    Catchable instance for BlobIO.

  9. final def asInstanceOf[T0]: T0

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

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

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def delay[A](a: ⇒ A): BlobIO[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. val free: BlobIO[Unit]

  17. def getBinaryStream(a: Long, b: Long): BlobIO[InputStream]

  18. val getBinaryStream: BlobIO[InputStream]

  19. def getBytes(a: Long, b: Int): BlobIO[Array[Byte]]

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

    Definition Classes
    AnyRef → Any
  21. def hashCode(): Int

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

    Natural transformation from BlobOp to Kleisli for the given M, consuming a java.sql.Blob.

  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. val length: BlobIO[Long]

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

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

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

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

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

    Definition Classes
    AnyRef
  29. def position(a: Array[Byte], b: Long): BlobIO[Long]

  30. def position(a: Blob, b: Long): BlobIO[Long]

  31. def raw[A](f: (Blob) ⇒ A): BlobIO[A]

    Backdoor for arbitrary computations on the underlying Blob.

  32. def setBinaryStream(a: Long): BlobIO[OutputStream]

  33. def setBytes(a: Long, b: Array[Byte]): BlobIO[Int]

  34. def setBytes(a: Long, b: Array[Byte], c: Int, d: Int): BlobIO[Int]

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

    Definition Classes
    AnyRef
  36. def toString(): String

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

    Natural transformation from BlobIO to M, given a java.sql.Blob.

  38. def transK[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[BlobIO, [γ]Kleisli[M, Blob, γ]]

    Natural transformation from BlobIO to Kleisli for the given M, consuming a java.sql.Blob.

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

  40. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Algebra

Constructors (Lifting)

Constructors (Primitives)

Typeclass Instances

Ungrouped