Object

doobie.postgres.free

pgconnection

Related Doc: package free

Permalink

object pgconnection

Algebra and free monad for primitive operations over a org.postgresql.PGConnection. 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.postgres.hi package.

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

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

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

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

Type Members

  1. type PGConnectionIO[A] = Free[PGConnectionOp, A]

    Permalink

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

  2. implicit class PGConnectionIOOps[A] extends AnyRef

    Permalink

    Syntax for PGConnectionIO.

  3. sealed trait PGConnectionOp[A] extends AnyRef

    Permalink

    Sum type of primitive operations over a org.postgresql.PGConnection.

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 CapturePGConnectionIO: Capture[PGConnectionIO]

    Permalink

    Capture instance for PGConnectionIO.

  5. implicit val CatchablePGConnectionIO: Catchable[PGConnectionIO]

    Permalink

    Catchable instance for PGConnectionIO.

  6. object PGConnectionOp

    Permalink

    Module of constructors for PGConnectionOp.

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

  7. def addDataType(a: String, b: Class[_ <: PGobject]): PGConnectionIO[Unit]

    Permalink

  8. def addDataType(a: String, b: String): PGConnectionIO[Unit]

    Permalink

  9. final def asInstanceOf[T0]: T0

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

    Permalink

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

  11. def clone(): AnyRef

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

    Permalink

    Non-strict unit for capturing effects.

  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 getBackendPID: PGConnectionIO[Int]

    Permalink

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

    Permalink
    Definition Classes
    AnyRef → Any
  18. val getCopyAPI: PGConnectionIO[CopyManager]

    Permalink

  19. val getFastpathAPI: PGConnectionIO[Fastpath]

    Permalink

  20. val getLargeObjectAPI: PGConnectionIO[LargeObjectManager]

    Permalink

  21. val getNotifications: PGConnectionIO[Array[PGNotification]]

    Permalink

  22. val getPrepareThreshold: PGConnectionIO[Int]

    Permalink

  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

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

    Permalink

    Natural transformation from PGConnectionOp to Kleisli for the given M, consuming a org.postgresql.PGConnection.

  26. def liftCopyManager[A](s: CopyManager, action: CopyManagerIO[A]): PGConnectionIO[A]

    Permalink

  27. def liftFastpath[A](s: Fastpath, action: FastpathIO[A]): PGConnectionIO[A]

    Permalink

  28. def liftLargeObjectManager[A](s: LargeObjectManager, action: LargeObjectManagerIO[A]): PGConnectionIO[A]

    Permalink

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

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

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

    Permalink
    Definition Classes
    AnyRef
  32. def setPrepareThreshold(a: Int): PGConnectionIO[Unit]

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  35. final def wait(): Unit

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

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