catchsql

doobie.util.catchsql$
object catchsql

Module of additional combinators for ApplicativeError, specific to SQLException.

Attributes

Source:
catchsql.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Value members

Concrete methods

def attemptSomeSqlState[M[_], A, B](ma: M[A])(f: PartialFunction[SqlState, B])(implicit AE: ApplicativeError[M, Throwable]): M[Either[B, A]]

Attributes

Source:
catchsql.scala
def attemptSql[M[_], A](ma: M[A])(implicit F: ApplicativeError[M, Throwable]): M[Either[SQLException, A]]

Like attempt but catches only SQLException.

Like attempt but catches only SQLException.

Attributes

Source:
catchsql.scala
def attemptSqlState[M[_], A](ma: M[A])(implicit ev: ApplicativeError[M, Throwable]): M[Either[SqlState, A]]

Like attemptSql but yields only the exception's SqlState.

Like attemptSql but yields only the exception's SqlState.

Attributes

Source:
catchsql.scala
def exceptSomeSqlState[M[_], A](ma: M[A])(pf: PartialFunction[SqlState, M[A]])(implicit AE: ApplicativeError[M, Throwable]): M[A]

Executes the handler where defined, for exceptions propagating from ma.

Executes the handler where defined, for exceptions propagating from ma.

Attributes

Source:
catchsql.scala
def exceptSql[M[_], A](ma: M[A])(handler: SQLException => M[A])(implicit F: ApplicativeError[M, Throwable]): M[A]

Executes the handler, for exceptions propagating from ma.

Executes the handler, for exceptions propagating from ma.

Attributes

Source:
catchsql.scala
def exceptSqlState[M[_], A](ma: M[A])(handler: SqlState => M[A])(implicit ev: ApplicativeError[M, Throwable]): M[A]

Executes the handler, for exceptions propagating from ma.

Executes the handler, for exceptions propagating from ma.

Attributes

Source:
catchsql.scala
def onSqlException[M[_], A, B](ma: M[A])(action: M[B])(implicit F: ApplicativeError[M, Throwable]): M[A]

Like "finally", but only performs the final action if there was an exception.

Like "finally", but only performs the final action if there was an exception.

Attributes

Source:
catchsql.scala