Object

doobie.free

connection

Related Doc: package free

Permalink

object connection

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

ConnectionIO is a free monad that must be run via an interpreter, most commonly via natural transformation of its underlying algebra ConnectionOp to another monad via Free.runFC.

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

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

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

Type Members

  1. type ConnectionIO[A] = Free[[x]Coyoneda[ConnectionOp, x], A]

    Permalink

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

  2. implicit class ConnectionIOOps[A] extends AnyRef

    Permalink

    Syntax for ConnectionIO.

  3. sealed trait ConnectionOp[A] extends AnyRef

    Permalink

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

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 CaptureConnectionIO: Capture[ConnectionIO]

    Permalink

    Capture instance for ConnectionIO.

  5. implicit val CatchableConnectionIO: Catchable[ConnectionIO]

    Permalink

    Catchable instance for ConnectionIO.

  6. object ConnectionOp

    Permalink

    Module of constructors for ConnectionOp.

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

  7. implicit val MonadConnectionIO: Monad[ConnectionIO]

    Permalink

    Monad instance for ConnectionIO (can't be inferred).

  8. def abort(a: Executor): ConnectionIO[Unit]

    Permalink

  9. final def asInstanceOf[T0]: T0

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

    Permalink

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

  11. val clearWarnings: ConnectionIO[Unit]

    Permalink

  12. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. val close: ConnectionIO[Unit]

    Permalink

  14. val commit: ConnectionIO[Unit]

    Permalink

  15. def createArrayOf(a: String, b: Array[AnyRef]): ConnectionIO[Array]

    Permalink

  16. val createBlob: ConnectionIO[Blob]

    Permalink

  17. val createClob: ConnectionIO[Clob]

    Permalink

  18. val createNClob: ConnectionIO[NClob]

    Permalink

  19. val createSQLXML: ConnectionIO[SQLXML]

    Permalink

  20. def createStatement(a: Int, b: Int, c: Int): ConnectionIO[Statement]

    Permalink

  21. def createStatement(a: Int, b: Int): ConnectionIO[Statement]

    Permalink

  22. val createStatement: ConnectionIO[Statement]

    Permalink

  23. def createStruct(a: String, b: Array[AnyRef]): ConnectionIO[Struct]

    Permalink

  24. def delay[A](a: ⇒ A): ConnectionIO[A]

    Permalink

    Non-strict unit for capturing effects.

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  28. val getAutoCommit: ConnectionIO[Boolean]

    Permalink

  29. val getCatalog: ConnectionIO[String]

    Permalink

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

    Permalink
    Definition Classes
    AnyRef → Any
  31. def getClientInfo(a: String): ConnectionIO[String]

    Permalink

  32. val getClientInfo: ConnectionIO[Properties]

    Permalink

  33. val getHoldability: ConnectionIO[Int]

    Permalink

  34. val getMetaData: ConnectionIO[DatabaseMetaData]

    Permalink

  35. val getNetworkTimeout: ConnectionIO[Int]

    Permalink

  36. val getSchema: ConnectionIO[String]

    Permalink

  37. val getTransactionIsolation: ConnectionIO[Int]

    Permalink

  38. val getTypeMap: ConnectionIO[Map[String, Class[_]]]

    Permalink

  39. val getWarnings: ConnectionIO[SQLWarning]

    Permalink

  40. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  41. def interpK[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[ConnectionOp, [γ]Kleisli[M, Connection, γ]]

    Permalink

    Natural transformation from ConnectionOp to Kleisli for the given M, consuming a java.sql.Connection.

  42. val isClosed: ConnectionIO[Boolean]

    Permalink

  43. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  44. val isReadOnly: ConnectionIO[Boolean]

    Permalink

  45. def isValid(a: Int): ConnectionIO[Boolean]

    Permalink

  46. def isWrapperFor(a: Class[_]): ConnectionIO[Boolean]

    Permalink

  47. def lift[Op[_], A, J](j: J, action: FreeC[Op, A])(implicit mod: Aux[Op, J]): ConnectionIO[A]

    Permalink

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

  48. def nativeSQL(a: String): ConnectionIO[String]

    Permalink

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

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

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

    Permalink
    Definition Classes
    AnyRef
  52. def prepareCall(a: String): ConnectionIO[CallableStatement]

    Permalink

  53. def prepareCall(a: String, b: Int, c: Int): ConnectionIO[CallableStatement]

    Permalink

  54. def prepareCall(a: String, b: Int, c: Int, d: Int): ConnectionIO[CallableStatement]

    Permalink

  55. def prepareStatement(a: String, b: Int): ConnectionIO[PreparedStatement]

    Permalink

  56. def prepareStatement(a: String, b: Array[Int]): ConnectionIO[PreparedStatement]

    Permalink

  57. def prepareStatement(a: String): ConnectionIO[PreparedStatement]

    Permalink

  58. def prepareStatement(a: String, b: Int, c: Int): ConnectionIO[PreparedStatement]

    Permalink

  59. def prepareStatement(a: String, b: Int, c: Int, d: Int): ConnectionIO[PreparedStatement]

    Permalink

  60. def prepareStatement(a: String, b: Array[String]): ConnectionIO[PreparedStatement]

    Permalink

  61. def raw[A](f: (Connection) ⇒ A): ConnectionIO[A]

    Permalink

    Backdoor for arbitrary computations on the underlying Connection.

  62. def releaseSavepoint(a: Savepoint): ConnectionIO[Unit]

    Permalink

  63. def rollback(a: Savepoint): ConnectionIO[Unit]

    Permalink

  64. val rollback: ConnectionIO[Unit]

    Permalink

  65. def setAutoCommit(a: Boolean): ConnectionIO[Unit]

    Permalink

  66. def setCatalog(a: String): ConnectionIO[Unit]

    Permalink

  67. def setClientInfo(a: Properties): ConnectionIO[Unit]

    Permalink

  68. def setClientInfo(a: String, b: String): ConnectionIO[Unit]

    Permalink

  69. def setHoldability(a: Int): ConnectionIO[Unit]

    Permalink

  70. def setNetworkTimeout(a: Executor, b: Int): ConnectionIO[Unit]

    Permalink

  71. def setReadOnly(a: Boolean): ConnectionIO[Unit]

    Permalink

  72. def setSavepoint(a: String): ConnectionIO[Savepoint]

    Permalink

  73. val setSavepoint: ConnectionIO[Savepoint]

    Permalink

  74. def setSchema(a: String): ConnectionIO[Unit]

    Permalink

  75. def setTransactionIsolation(a: Int): ConnectionIO[Unit]

    Permalink

  76. def setTypeMap(a: Map[String, Class[_]]): ConnectionIO[Unit]

    Permalink

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

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

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

    Permalink

    Natural transformation from ConnectionIO to M, given a java.sql.Connection.

  80. def transK[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[ConnectionIO, [γ]Kleisli[M, Connection, γ]]

    Permalink

    Natural transformation from ConnectionIO to Kleisli for the given M, consuming a java.sql.Connection.

  81. def unwrap[T](a: Class[T]): ConnectionIO[T]

    Permalink

  82. final def wait(): Unit

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

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