doobie.free

callablestatement

object callablestatement

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

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

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

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

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

Type Members

  1. type CallableStatementIO[A] = Free[CallableStatementOp, A]

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

  2. implicit class CallableStatementIOOps[A] extends AnyRef

    Syntax for CallableStatementIO.

  3. sealed trait CallableStatementOp[A] extends AnyRef

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

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. object CallableStatementOp

    Module of constructors for CallableStatementOp.

  7. implicit val CaptureCallableStatementIO: Capture[CallableStatementIO]

    Capture instance for CallableStatementIO.

  8. implicit val CatchableCallableStatementIO: Catchable[CallableStatementIO]

    Catchable instance for CallableStatementIO.

  9. def addBatch(a: String): CallableStatementIO[Unit]

  10. val addBatch: CallableStatementIO[Unit]

  11. final def asInstanceOf[T0]: T0

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

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

  13. val cancel: CallableStatementIO[Unit]

  14. val clearBatch: CallableStatementIO[Unit]

  15. val clearParameters: CallableStatementIO[Unit]

  16. val clearWarnings: CallableStatementIO[Unit]

  17. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. val close: CallableStatementIO[Unit]

  19. val closeOnCompletion: CallableStatementIO[Unit]

  20. def delay[A](a: ⇒ A): CallableStatementIO[A]

    Non-strict unit for capturing effects.

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

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

    Definition Classes
    AnyRef → Any
  23. def execute(a: String, b: Array[String]): CallableStatementIO[Boolean]

  24. def execute(a: String): CallableStatementIO[Boolean]

  25. def execute(a: String, b: Int): CallableStatementIO[Boolean]

  26. def execute(a: String, b: Array[Int]): CallableStatementIO[Boolean]

  27. val execute: CallableStatementIO[Boolean]

  28. val executeBatch: CallableStatementIO[Array[Int]]

  29. def executeQuery(a: String): CallableStatementIO[ResultSet]

  30. val executeQuery: CallableStatementIO[ResultSet]

  31. def executeUpdate(a: String, b: Int): CallableStatementIO[Int]

  32. def executeUpdate(a: String, b: Array[Int]): CallableStatementIO[Int]

  33. def executeUpdate(a: String, b: Array[String]): CallableStatementIO[Int]

  34. def executeUpdate(a: String): CallableStatementIO[Int]

  35. val executeUpdate: CallableStatementIO[Int]

  36. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  37. def getArray(a: String): CallableStatementIO[Array]

  38. def getArray(a: Int): CallableStatementIO[Array]

  39. def getBigDecimal(a: Int): CallableStatementIO[BigDecimal]

  40. def getBigDecimal(a: String): CallableStatementIO[BigDecimal]

  41. def getBigDecimal(a: Int, b: Int): CallableStatementIO[BigDecimal]

  42. def getBlob(a: String): CallableStatementIO[Blob]

  43. def getBlob(a: Int): CallableStatementIO[Blob]

  44. def getBoolean(a: Int): CallableStatementIO[Boolean]

  45. def getBoolean(a: String): CallableStatementIO[Boolean]

  46. def getByte(a: String): CallableStatementIO[Byte]

  47. def getByte(a: Int): CallableStatementIO[Byte]

  48. def getBytes(a: Int): CallableStatementIO[Array[Byte]]

  49. def getBytes(a: String): CallableStatementIO[Array[Byte]]

  50. def getCharacterStream(a: Int): CallableStatementIO[Reader]

  51. def getCharacterStream(a: String): CallableStatementIO[Reader]

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

    Definition Classes
    AnyRef → Any
  53. def getClob(a: Int): CallableStatementIO[Clob]

  54. def getClob(a: String): CallableStatementIO[Clob]

  55. val getConnection: CallableStatementIO[Connection]

  56. def getDate(a: String, b: Calendar): CallableStatementIO[Date]

  57. def getDate(a: String): CallableStatementIO[Date]

  58. def getDate(a: Int): CallableStatementIO[Date]

  59. def getDate(a: Int, b: Calendar): CallableStatementIO[Date]

  60. def getDouble(a: String): CallableStatementIO[Double]

  61. def getDouble(a: Int): CallableStatementIO[Double]

  62. val getFetchDirection: CallableStatementIO[Int]

  63. val getFetchSize: CallableStatementIO[Int]

  64. def getFloat(a: Int): CallableStatementIO[Float]

  65. def getFloat(a: String): CallableStatementIO[Float]

  66. val getGeneratedKeys: CallableStatementIO[ResultSet]

  67. def getInt(a: String): CallableStatementIO[Int]

  68. def getInt(a: Int): CallableStatementIO[Int]

  69. def getLong(a: String): CallableStatementIO[Long]

  70. def getLong(a: Int): CallableStatementIO[Long]

  71. val getMaxFieldSize: CallableStatementIO[Int]

  72. val getMaxRows: CallableStatementIO[Int]

  73. val getMetaData: CallableStatementIO[ResultSetMetaData]

  74. def getMoreResults(a: Int): CallableStatementIO[Boolean]

  75. val getMoreResults: CallableStatementIO[Boolean]

  76. def getNCharacterStream(a: String): CallableStatementIO[Reader]

  77. def getNCharacterStream(a: Int): CallableStatementIO[Reader]

  78. def getNClob(a: String): CallableStatementIO[NClob]

  79. def getNClob(a: Int): CallableStatementIO[NClob]

  80. def getNString(a: String): CallableStatementIO[String]

  81. def getNString(a: Int): CallableStatementIO[String]

  82. def getObject(a: String, b: Map[String, Class[_]]): CallableStatementIO[AnyRef]

  83. def getObject(a: Int): CallableStatementIO[AnyRef]

  84. def getObject(a: String): CallableStatementIO[AnyRef]

  85. def getObject(a: Int, b: Map[String, Class[_]]): CallableStatementIO[AnyRef]

  86. def getObject[T](a: String, b: Class[T]): CallableStatementIO[T]

  87. def getObject[T](a: Int, b: Class[T]): CallableStatementIO[T]

  88. val getParameterMetaData: CallableStatementIO[ParameterMetaData]

  89. val getQueryTimeout: CallableStatementIO[Int]

  90. def getRef(a: Int): CallableStatementIO[Ref]

  91. def getRef(a: String): CallableStatementIO[Ref]

  92. val getResultSet: CallableStatementIO[ResultSet]

  93. val getResultSetConcurrency: CallableStatementIO[Int]

  94. val getResultSetHoldability: CallableStatementIO[Int]

  95. val getResultSetType: CallableStatementIO[Int]

  96. def getRowId(a: Int): CallableStatementIO[RowId]

  97. def getRowId(a: String): CallableStatementIO[RowId]

  98. def getSQLXML(a: String): CallableStatementIO[SQLXML]

  99. def getSQLXML(a: Int): CallableStatementIO[SQLXML]

  100. def getShort(a: String): CallableStatementIO[Short]

  101. def getShort(a: Int): CallableStatementIO[Short]

  102. def getString(a: Int): CallableStatementIO[String]

  103. def getString(a: String): CallableStatementIO[String]

  104. def getTime(a: Int, b: Calendar): CallableStatementIO[Time]

  105. def getTime(a: String, b: Calendar): CallableStatementIO[Time]

  106. def getTime(a: Int): CallableStatementIO[Time]

  107. def getTime(a: String): CallableStatementIO[Time]

  108. def getTimestamp(a: String, b: Calendar): CallableStatementIO[Timestamp]

  109. def getTimestamp(a: Int, b: Calendar): CallableStatementIO[Timestamp]

  110. def getTimestamp(a: Int): CallableStatementIO[Timestamp]

  111. def getTimestamp(a: String): CallableStatementIO[Timestamp]

  112. def getURL(a: Int): CallableStatementIO[URL]

  113. def getURL(a: String): CallableStatementIO[URL]

  114. val getUpdateCount: CallableStatementIO[Int]

  115. val getWarnings: CallableStatementIO[SQLWarning]

  116. def hashCode(): Int

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

    Natural transformation from CallableStatementOp to Kleisli for the given M, consuming a java.sql.CallableStatement.

  118. val isCloseOnCompletion: CallableStatementIO[Boolean]

  119. val isClosed: CallableStatementIO[Boolean]

  120. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  121. val isPoolable: CallableStatementIO[Boolean]

  122. def isWrapperFor(a: Class[_]): CallableStatementIO[Boolean]

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

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

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

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

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

    Definition Classes
    AnyRef
  127. def raw[A](f: (CallableStatement) ⇒ A): CallableStatementIO[A]

    Backdoor for arbitrary computations on the underlying CallableStatement.

  128. def registerOutParameter(a: Int, b: Int): CallableStatementIO[Unit]

  129. def registerOutParameter(a: Int, b: Int, c: Int): CallableStatementIO[Unit]

  130. def registerOutParameter(a: String, b: Int): CallableStatementIO[Unit]

  131. def registerOutParameter(a: String, b: Int, c: Int): CallableStatementIO[Unit]

  132. def registerOutParameter(a: String, b: Int, c: String): CallableStatementIO[Unit]

  133. def registerOutParameter(a: Int, b: Int, c: String): CallableStatementIO[Unit]

  134. def setArray(a: Int, b: Array): CallableStatementIO[Unit]

  135. def setAsciiStream(a: Int, b: InputStream): CallableStatementIO[Unit]

  136. def setAsciiStream(a: Int, b: InputStream, c: Int): CallableStatementIO[Unit]

  137. def setAsciiStream(a: Int, b: InputStream, c: Long): CallableStatementIO[Unit]

  138. def setAsciiStream(a: String, b: InputStream): CallableStatementIO[Unit]

  139. def setAsciiStream(a: String, b: InputStream, c: Int): CallableStatementIO[Unit]

  140. def setAsciiStream(a: String, b: InputStream, c: Long): CallableStatementIO[Unit]

  141. def setBigDecimal(a: Int, b: BigDecimal): CallableStatementIO[Unit]

  142. def setBigDecimal(a: String, b: BigDecimal): CallableStatementIO[Unit]

  143. def setBinaryStream(a: Int, b: InputStream, c: Long): CallableStatementIO[Unit]

  144. def setBinaryStream(a: Int, b: InputStream): CallableStatementIO[Unit]

  145. def setBinaryStream(a: Int, b: InputStream, c: Int): CallableStatementIO[Unit]

  146. def setBinaryStream(a: String, b: InputStream): CallableStatementIO[Unit]

  147. def setBinaryStream(a: String, b: InputStream, c: Int): CallableStatementIO[Unit]

  148. def setBinaryStream(a: String, b: InputStream, c: Long): CallableStatementIO[Unit]

  149. def setBlob(a: Int, b: InputStream): CallableStatementIO[Unit]

  150. def setBlob(a: Int, b: InputStream, c: Long): CallableStatementIO[Unit]

  151. def setBlob(a: Int, b: Blob): CallableStatementIO[Unit]

  152. def setBlob(a: String, b: InputStream): CallableStatementIO[Unit]

  153. def setBlob(a: String, b: InputStream, c: Long): CallableStatementIO[Unit]

  154. def setBlob(a: String, b: Blob): CallableStatementIO[Unit]

  155. def setBoolean(a: Int, b: Boolean): CallableStatementIO[Unit]

  156. def setBoolean(a: String, b: Boolean): CallableStatementIO[Unit]

  157. def setByte(a: Int, b: Byte): CallableStatementIO[Unit]

  158. def setByte(a: String, b: Byte): CallableStatementIO[Unit]

  159. def setBytes(a: Int, b: Array[Byte]): CallableStatementIO[Unit]

  160. def setBytes(a: String, b: Array[Byte]): CallableStatementIO[Unit]

  161. def setCharacterStream(a: Int, b: Reader, c: Long): CallableStatementIO[Unit]

  162. def setCharacterStream(a: Int, b: Reader, c: Int): CallableStatementIO[Unit]

  163. def setCharacterStream(a: Int, b: Reader): CallableStatementIO[Unit]

  164. def setCharacterStream(a: String, b: Reader, c: Int): CallableStatementIO[Unit]

  165. def setCharacterStream(a: String, b: Reader, c: Long): CallableStatementIO[Unit]

  166. def setCharacterStream(a: String, b: Reader): CallableStatementIO[Unit]

  167. def setClob(a: Int, b: Reader, c: Long): CallableStatementIO[Unit]

  168. def setClob(a: Int, b: Reader): CallableStatementIO[Unit]

  169. def setClob(a: Int, b: Clob): CallableStatementIO[Unit]

  170. def setClob(a: String, b: Reader): CallableStatementIO[Unit]

  171. def setClob(a: String, b: Clob): CallableStatementIO[Unit]

  172. def setClob(a: String, b: Reader, c: Long): CallableStatementIO[Unit]

  173. def setCursorName(a: String): CallableStatementIO[Unit]

  174. def setDate(a: Int, b: Date, c: Calendar): CallableStatementIO[Unit]

  175. def setDate(a: Int, b: Date): CallableStatementIO[Unit]

  176. def setDate(a: String, b: Date, c: Calendar): CallableStatementIO[Unit]

  177. def setDate(a: String, b: Date): CallableStatementIO[Unit]

  178. def setDouble(a: Int, b: Double): CallableStatementIO[Unit]

  179. def setDouble(a: String, b: Double): CallableStatementIO[Unit]

  180. def setEscapeProcessing(a: Boolean): CallableStatementIO[Unit]

  181. def setFetchDirection(a: Int): CallableStatementIO[Unit]

  182. def setFetchSize(a: Int): CallableStatementIO[Unit]

  183. def setFloat(a: Int, b: Float): CallableStatementIO[Unit]

  184. def setFloat(a: String, b: Float): CallableStatementIO[Unit]

  185. def setInt(a: Int, b: Int): CallableStatementIO[Unit]

  186. def setInt(a: String, b: Int): CallableStatementIO[Unit]

  187. def setLong(a: Int, b: Long): CallableStatementIO[Unit]

  188. def setLong(a: String, b: Long): CallableStatementIO[Unit]

  189. def setMaxFieldSize(a: Int): CallableStatementIO[Unit]

  190. def setMaxRows(a: Int): CallableStatementIO[Unit]

  191. def setNCharacterStream(a: Int, b: Reader, c: Long): CallableStatementIO[Unit]

  192. def setNCharacterStream(a: Int, b: Reader): CallableStatementIO[Unit]

  193. def setNCharacterStream(a: String, b: Reader, c: Long): CallableStatementIO[Unit]

  194. def setNCharacterStream(a: String, b: Reader): CallableStatementIO[Unit]

  195. def setNClob(a: Int, b: Reader): CallableStatementIO[Unit]

  196. def setNClob(a: Int, b: NClob): CallableStatementIO[Unit]

  197. def setNClob(a: Int, b: Reader, c: Long): CallableStatementIO[Unit]

  198. def setNClob(a: String, b: Reader, c: Long): CallableStatementIO[Unit]

  199. def setNClob(a: String, b: NClob): CallableStatementIO[Unit]

  200. def setNClob(a: String, b: Reader): CallableStatementIO[Unit]

  201. def setNString(a: Int, b: String): CallableStatementIO[Unit]

  202. def setNString(a: String, b: String): CallableStatementIO[Unit]

  203. def setNull(a: Int, b: Int, c: String): CallableStatementIO[Unit]

  204. def setNull(a: Int, b: Int): CallableStatementIO[Unit]

  205. def setNull(a: String, b: Int): CallableStatementIO[Unit]

  206. def setNull(a: String, b: Int, c: String): CallableStatementIO[Unit]

  207. def setObject(a: Int, b: AnyRef): CallableStatementIO[Unit]

  208. def setObject(a: Int, b: AnyRef, c: Int): CallableStatementIO[Unit]

  209. def setObject(a: Int, b: AnyRef, c: Int, d: Int): CallableStatementIO[Unit]

  210. def setObject(a: String, b: AnyRef, c: Int, d: Int): CallableStatementIO[Unit]

  211. def setObject(a: String, b: AnyRef): CallableStatementIO[Unit]

  212. def setObject(a: String, b: AnyRef, c: Int): CallableStatementIO[Unit]

  213. def setPoolable(a: Boolean): CallableStatementIO[Unit]

  214. def setQueryTimeout(a: Int): CallableStatementIO[Unit]

  215. def setRef(a: Int, b: Ref): CallableStatementIO[Unit]

  216. def setRowId(a: Int, b: RowId): CallableStatementIO[Unit]

  217. def setRowId(a: String, b: RowId): CallableStatementIO[Unit]

  218. def setSQLXML(a: Int, b: SQLXML): CallableStatementIO[Unit]

  219. def setSQLXML(a: String, b: SQLXML): CallableStatementIO[Unit]

  220. def setShort(a: Int, b: Short): CallableStatementIO[Unit]

  221. def setShort(a: String, b: Short): CallableStatementIO[Unit]

  222. def setString(a: Int, b: String): CallableStatementIO[Unit]

  223. def setString(a: String, b: String): CallableStatementIO[Unit]

  224. def setTime(a: Int, b: Time): CallableStatementIO[Unit]

  225. def setTime(a: Int, b: Time, c: Calendar): CallableStatementIO[Unit]

  226. def setTime(a: String, b: Time, c: Calendar): CallableStatementIO[Unit]

  227. def setTime(a: String, b: Time): CallableStatementIO[Unit]

  228. def setTimestamp(a: Int, b: Timestamp, c: Calendar): CallableStatementIO[Unit]

  229. def setTimestamp(a: Int, b: Timestamp): CallableStatementIO[Unit]

  230. def setTimestamp(a: String, b: Timestamp): CallableStatementIO[Unit]

  231. def setTimestamp(a: String, b: Timestamp, c: Calendar): CallableStatementIO[Unit]

  232. def setURL(a: Int, b: URL): CallableStatementIO[Unit]

  233. def setURL(a: String, b: URL): CallableStatementIO[Unit]

  234. def setUnicodeStream(a: Int, b: InputStream, c: Int): CallableStatementIO[Unit]

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

    Definition Classes
    AnyRef
  236. def toString(): String

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

    Natural transformation from CallableStatementIO to M, given a java.sql.CallableStatement.

  238. def transK[M[_]](implicit arg0: Monad[M], arg1: Catchable[M], arg2: Capture[M]): ~>[CallableStatementIO, [γ]Kleisli[M, CallableStatement, γ]]

    Natural transformation from CallableStatementIO to Kleisli for the given M, consuming a java.sql.CallableStatement.

  239. def unwrap[T](a: Class[T]): CallableStatementIO[T]

  240. final def wait(): Unit

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  242. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  243. val wasNull: CallableStatementIO[Boolean]

Inherited from AnyRef

Inherited from Any

Algebra

Constructors (Lifting)

Constructors (Primitives)

Typeclass Instances

Ungrouped