Object

doobie.postgres.free

copyin

Related Doc: package free

Permalink

object copyin extends CopyInIOInstances

Algebra and free monad for primitive operations over a org.postgresql.copy.CopyIn. 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.

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

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

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

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

Type Members

  1. type CopyInIO[A] = Free[CopyInOp, A]

    Permalink

    Free monad over a free functor of CopyInOp; abstractly, a computation that consumes a org.postgresql.copy.CopyIn and produces a value of type A.

  2. implicit class CopyInIOOps[A] extends AnyRef

    Permalink

    Syntax for CopyInIO.

  3. sealed trait CopyInOp[A] extends AnyRef

    Permalink

    Sum type of primitive operations over a org.postgresql.copy.CopyIn.

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 CaptureCopyInIO: Capture[CopyInIO]

    Permalink

    Capture instance for CopyInIO.

  5. implicit val CatchableCopyInIO: Catchable[CopyInIO]

    Permalink

    Catchable instance for CopyInIO.

  6. object CopyInOp

    Permalink

    Module of constructors for CopyInOp.

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

  7. final def asInstanceOf[T0]: T0

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

    Permalink

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

  9. val cancelCopy: CopyInIO[Unit]

    Permalink

  10. def clone(): AnyRef

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

    Permalink

    Non-strict unit for capturing effects.

  12. val endCopy: CopyInIO[Long]

    Permalink

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. val flushCopy: CopyInIO[Unit]

    Permalink

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

    Permalink
    Definition Classes
    AnyRef → Any
  18. val getFieldCount: CopyInIO[Int]

    Permalink

  19. def getFieldFormat(a: Int): CopyInIO[Int]

    Permalink

  20. val getFormat: CopyInIO[Int]

    Permalink

  21. val getHandledRowCount: CopyInIO[Long]

    Permalink

  22. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  23. val isActive: CopyInIO[Boolean]

    Permalink

  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def kleisliTrans[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[CopyInOp, [γ$0$]Kleisli[M, CopyIn, γ$0$]]

    Permalink

    Natural transformation from CopyInOp to Kleisli for the given M, consuming a org.postgresql.copy.CopyIn.

  26. def liftCopyOut[A](s: CopyOut, k: CopyOutIO[A]): CopyInIO[A]

    Permalink

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

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

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

    Permalink
    Definition Classes
    AnyRef
  30. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  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( ... )
  35. def writeToCopy(a: Array[Byte], b: Int, c: Int): CopyInIO[Unit]

    Permalink

Inherited from CopyInIOInstances

Inherited from AnyRef

Inherited from Any

Algebra

Constructors (Lifting)

Constructors (Primitives)

Typeclass Instances

Ungrouped