Object

doobie.free

blob

Related Doc: package free

Permalink

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.runFC.

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
Visibility
  1. Public
  2. All

Type Members

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

    Permalink

    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

    Permalink

    Syntax for BlobIO.

  3. sealed trait BlobOp[A] extends AnyRef

    Permalink

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

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

    Permalink

    Module of constructors for BlobOp.

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

  5. implicit val CaptureBlobIO: Capture[BlobIO]

    Permalink

    Capture instance for BlobIO.

  6. implicit val CatchableBlobIO: Catchable[BlobIO]

    Permalink

    Catchable instance for BlobIO.

  7. implicit val MonadBlobIO: Monad[BlobIO]

    Permalink

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

  8. final def asInstanceOf[T0]: T0

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

    Permalink

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

  10. def clone(): AnyRef

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

    Permalink

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

    Permalink

  17. val getBinaryStream: BlobIO[InputStream]

    Permalink

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

    Permalink

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

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

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

    Permalink

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

  22. final def isInstanceOf[T0]: Boolean

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

    Permalink

  24. def liftCallableStatement[A](s: CallableStatement, k: CallableStatementIO[A]): BlobIO[A]

    Permalink

  25. def liftClob[A](s: Clob, k: ClobIO[A]): BlobIO[A]

    Permalink

  26. def liftConnection[A](s: Connection, k: ConnectionIO[A]): BlobIO[A]

    Permalink

  27. def liftDatabaseMetaData[A](s: DatabaseMetaData, k: DatabaseMetaDataIO[A]): BlobIO[A]

    Permalink

  28. def liftDriver[A](s: Driver, k: DriverIO[A]): BlobIO[A]

    Permalink

  29. def liftNClob[A](s: NClob, k: NClobIO[A]): BlobIO[A]

    Permalink

  30. def liftPreparedStatement[A](s: PreparedStatement, k: PreparedStatementIO[A]): BlobIO[A]

    Permalink

  31. def liftRef[A](s: Ref, k: RefIO[A]): BlobIO[A]

    Permalink

  32. def liftResultSet[A](s: ResultSet, k: ResultSetIO[A]): BlobIO[A]

    Permalink

  33. def liftSQLData[A](s: SQLData, k: SQLDataIO[A]): BlobIO[A]

    Permalink

  34. def liftSQLInput[A](s: SQLInput, k: SQLInputIO[A]): BlobIO[A]

    Permalink

  35. def liftSQLOutput[A](s: SQLOutput, k: SQLOutputIO[A]): BlobIO[A]

    Permalink

  36. def liftStatement[A](s: Statement, k: StatementIO[A]): BlobIO[A]

    Permalink

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

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

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

    Permalink
    Definition Classes
    AnyRef
  40. def position(a: Blob, b: Long): BlobIO[Long]

    Permalink

  41. def position(a: Array[Byte], b: Long): BlobIO[Long]

    Permalink

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

    Permalink

    Backdoor for arbitrary computations on the underlying Blob.

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

    Permalink

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

    Permalink

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

    Permalink

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

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

  51. final def wait(): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. 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