doobie.Columns
See theColumns companion object
Allows you to select columns in a type-safe way.
Example:
val columns = Columns((nameCol.tmf, ageCol.tmf, pet1Col.tmf, pet2Col.tmf))
val resultQuery: Query0[(String, Int, String, Option[String])] =
sql"SELECT $columns FROM $personWithPetsTable".queryOf(columns)
Type parameters
- QueryResult
-
the type of
Fragment.queryOf(columns)
expression.
Value parameters
- sql
-
returns the names of the columns, for example "name, surname, age".
Attributes
- Companion
- object
- Source
- Columns.scala
- Graph
-
- Supertypes
Members list
In this article