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 CatchablePGConnectionIO: Catchable[PGConnectionIO]

    Permalink

    Catchable instance for PGConnectionIO.

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

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

    Permalink

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

    Permalink

  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def attempt[A](a: PGConnectionIO[A]): PGConnectionIO[Either[Throwable, A]]

    Permalink

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

  10. def clone(): AnyRef

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

    Permalink

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

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

    Permalink

  18. val getFastpathAPI: PGConnectionIO[Fastpath]

    Permalink

  19. val getLargeObjectAPI: PGConnectionIO[LargeObjectManager]

    Permalink

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

    Permalink

  21. val getPrepareThreshold: PGConnectionIO[Int]

    Permalink

  22. def hashCode(): Int

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

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

    Permalink

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

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

    Permalink

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

    Permalink

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

    Permalink

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

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

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

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

    Permalink

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

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

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

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

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