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 Put[A]): Conversion[A, TypedFragment[A]]

Attributes

Source
TypedFragment.scala

Extensions

Extensions

extension [A](tf: TypedFragment[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