doobie.scalatest

Members list

Concise view

Type members

Classlikes

trait AnalysisMatchers[F[_]] extends CheckerBase[F]

Provides matcher syntax for query checking:

Provides matcher syntax for query checking:

sql"select 1".query[Int] must typecheck

Attributes

Source:
AnalysisMatchers.scala
Graph
Supertypes
trait CheckerBase[F]
class Object
trait Matchable
class Any
Known subtypes
trait Checker[M[_]] extends CheckerBase[M]

Mix-in trait for specifications that enables checking of doobie Query and Update values. Users must provide an effect type M as well as a Transactor[M] and instances. As a convenience doobie provides specializations for common effect types (see other types in this package).

Mix-in trait for specifications that enables checking of doobie Query and Update values. Users must provide an effect type M as well as a Transactor[M] and instances. As a convenience doobie provides specializations for common effect types (see other types in this package).

// An example specification, taken from the examples project.
class ExampleSpec extends AnyFunSuite with IOChecker {

 // The transactor to use for the tests.
 val transactor = Transactor.fromDriverManager[IO](...)

 // Now just mention the queries. Arguments are not used.
 test("findByNameAndAge") { check(MyDaoModule.findByNameAndAge(null, 0)) }
 test("allWoozles") { check(MyDaoModule.allWoozles) }

}

Attributes

Source:
Checker.scala
Graph
Supertypes
trait CheckerBase[M]
class Object
trait Matchable
class Any
Known subtypes
trait IOChecker
Self type
Assertions

Attributes

Source:
AnalysisMatchers.scala
Graph
Supertypes
trait CheckerBase[IO]
class Object
trait Matchable
class Any
trait IOChecker extends Checker[IO]

Implementation of Checker[IO]

Implementation of Checker[IO]

Attributes

Source:
Checker.scala
Graph
Supertypes
trait Checker[IO]
trait CheckerBase[IO]
class Object
trait Matchable
class Any
Self type
Assertions