doobie.free

driver

object driver

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

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

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

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

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

Type Members

  1. type DriverIO[A] = Free[DriverOp, A]

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

  2. implicit class DriverIOOps[A] extends AnyRef

    Syntax for DriverIO.

  3. sealed trait DriverOp[A] extends AnyRef

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

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. implicit val CaptureDriverIO: Capture[DriverIO]

    Capture instance for DriverIO.

  7. implicit val CatchableDriverIO: Catchable[DriverIO]

    Catchable instance for DriverIO.

  8. object DriverOp

    Module of constructors for DriverOp.

  9. def acceptsURL(a: String): DriverIO[Boolean]

  10. final def asInstanceOf[T0]: T0

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

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

  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. def connect(a: String, b: Properties): DriverIO[Connection]

  14. def delay[A](a: ⇒ A): DriverIO[A]

    Non-strict unit for capturing effects.

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

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  19. val getMajorVersion: DriverIO[Int]

  20. val getMinorVersion: DriverIO[Int]

  21. val getParentLogger: DriverIO[Logger]

  22. def getPropertyInfo(a: String, b: Properties): DriverIO[Array[DriverPropertyInfo]]

  23. def hashCode(): Int

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

    Natural transformation from DriverOp to Kleisli for the given M, consuming a java.sql.Driver.

  25. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  26. val jdbcCompliant: DriverIO[Boolean]

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

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

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

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

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

    Definition Classes
    AnyRef
  31. def raw[A](f: (Driver) ⇒ A): DriverIO[A]

    Backdoor for arbitrary computations on the underlying Driver.

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

    Definition Classes
    AnyRef
  33. def toString(): String

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

    Natural transformation from DriverIO to M, given a java.sql.Driver.

  35. def transK[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[DriverIO, [γ]Kleisli[M, Driver, γ]]

    Natural transformation from DriverIO to Kleisli for the given M, consuming a java.sql.Driver.

  36. final def wait(): Unit

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

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