Object

doobie.free

driver

Related Doc: package free

Permalink

object driver extends DriverIOInstances

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
DriverIOInstances, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. driver
  2. DriverIOInstances
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

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

    Permalink

    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

    Permalink

    Syntax for DriverIO.

  3. sealed trait DriverOp[A] extends AnyRef

    Permalink

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

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

    Permalink

    Capture instance for DriverIO.

  5. implicit val CatchableDriverIO: Catchable[DriverIO]

    Permalink

    Catchable instance for DriverIO.

  6. object DriverOp

    Permalink

    Module of constructors for DriverOp.

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

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

    Permalink

  8. final def asInstanceOf[T0]: T0

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

    Permalink

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

  10. def clone(): AnyRef

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

    Permalink

  12. def delay[A](a: ⇒ A): DriverIO[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. final def getClass(): Class[_]

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

    Permalink

  18. val getMinorVersion: DriverIO[Int]

    Permalink

  19. val getParentLogger: DriverIO[Logger]

    Permalink

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

    Permalink

  21. def hashCode(): Int

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

    Permalink

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

  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. val jdbcCompliant: DriverIO[Boolean]

    Permalink

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

    Permalink

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

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

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

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

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

    Permalink

    Backdoor for arbitrary computations on the underlying Driver.

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

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

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

    Permalink

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

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

    Permalink

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

  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 DriverIOInstances

Inherited from AnyRef

Inherited from Any

Algebra

Constructors (Lifting)

Constructors (Primitives)

Typeclass Instances

Ungrouped