RowHelpers

doobie.TableDefinition.RowHelpers
trait RowHelpers[TRow](val tableDefinition: TableDefinition)

Helper that allows you to quickly get some of the queries for the table.

You should put this on the companion object of the row.

Example:

 object Cars extends TableDefinition("cars") {
   val idCol = Column[Long]("id")
   val makeCol = Column[String]("make")

   case class Row(id: Long, make: String)
   object Row extends WithSQLDefinition[Row](
     Composite((idCol.sqlDef, makeCol.sqlDef))(Row.apply)(Tuple.fromProductTyped)
   ) with TableDefinition.RowHelpers[Row](this)
 }

Type parameters

TRow

the type of the row.

Attributes

Source
TableDefinition.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete fields

lazy val insert: Update[TRow]

Inserts the whole row.

Inserts the whole row.

Attributes

Source
TableDefinition.scala

Inserts the whole row, ignoring if such row already exists.

Inserts the whole row, ignoring if such row already exists.

Attributes

Source
TableDefinition.scala
lazy val selectAll: Query0[TRow]

Selects all rows.

Selects all rows.

Attributes

Source
TableDefinition.scala