FragmentExtensions

doobie.FragmentExtensions$package$.FragmentExtensions
final implicit class FragmentExtensions(fragment: Fragment) extends AnyVal

Attributes

Source
FragmentExtensions.scala
Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Value members

Concrete methods

inline def queryOf[A](using Read[A]): Query0[A]

So we wouldn't have discrepancy between the 0-column and N-column variants.

So we wouldn't have discrepancy between the 0-column and N-column variants.

Attributes

Source
FragmentExtensions.scala
def queryOf[A](r: SQLDefinition[A]): Query0[A]

Returns the Query0 for the given SQLDefinition.

Returns the Query0 for the given SQLDefinition.

Example:

 sql"""
 SELECT ${t.characterExperience} FROM $t
 WHERE ${t.user_id === userId} AND ${t.guid === character}
 LIMIT 1
 """.queryOf(t.characterExperience)

Attributes

Source
FragmentExtensions.scala
def queryOf[A](c: Columns[A])(using Read[A]): Query0[A]

Returns the Query0 for the given Columns.

Returns the Query0 for the given Columns.

Example:

 import tables.Characters as t
 val columns = Columns((t.characterExperience.sqlDef, t.characterLevel.sqlDef))
 sql"SELECT $columns FROM $t".queryOf(columns)

Attributes

Source
FragmentExtensions.scala
inline def rawSql: String

Exposes the raw SQL of this fragment.

Exposes the raw SQL of this fragment.

Attributes

Source
FragmentExtensions.scala