Columns

doobie.Columns
See theColumns companion object
case class Columns[+QueryResult]

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
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Constructors

def this(tuple: Tuple)

Attributes

Source
Columns.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product