TypedFragment

doobie.TypedFragment
See theTypedFragment companion trait
object TypedFragment

Attributes

Companion
trait
Source
TypedFragment.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Givens

Givens

given given_Conversion_A_TypedFragment[A](using r: Read[A], p: Put[A]): Conversion[A, TypedFragment[A]]

Value parameters

p

the instance is required to construct the TypedFragment.fragment

Attributes

Source
TypedFragment.scala
given given_Conversion_Fragment_TypedFragment[A](using r: Read[A]): Conversion[Fragment, TypedFragment[A]]

Attributes

Source
TypedFragment.scala

Extensions

Extensions

extension [A](tf: TypedFragment[A])
def ===(a: A)(using Write[A]): Fragment

Allows you to use the TypedFragment in a SQL query.

Allows you to use the TypedFragment in a SQL query.

For example:

 val matchIdSql: TypedFragment[Option[MatchId]] =
   sql"($matchData->session_mode->>match_id)::uuid"
 sql"UPDATE matches SET ${matchIdSql === Some(matchId)}"

Attributes

Source
TypedFragment.scala