TypedFragment

doobie.TypedFragment
See theTypedFragment companion object
trait TypedFragment[+A] extends TypedMultiFragment[A]

A doobie fragment that refers to a single column/value which produces a value of type A.

Attributes

Companion
object
Source
TypedFragment.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Column[A]

Members list

Value members

Concrete methods

def ===(a: A)(using Write[A]): Fragment
Extension method from TypedFragment

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

Inherited methods

Attributes

Inherited from:
TypedMultiFragment
Source
TypedMultiFragment.scala
inline def tmf: TypedMultiFragment[A]

To allow widening the type of Column and similar ones to TypedMultiFragment.

To allow widening the type of Column and similar ones to TypedMultiFragment.

This is useful when working with tuples of TypedMultiFragments, because (Column[Int], Column[String]) is not the same thing as (TypedMultiFragment[Int], TypedMultiFragment[String]).

Attributes

Inherited from:
TypedMultiFragment
Source
TypedMultiFragment.scala