TableDefinition

doobie.TableDefinition
See theTableDefinition companion object
class TableDefinition(val rawName: String) extends TableName

Defines a table.

Example:

 object Users extends TableDefinition("users") {
   val id = Column[Int]("id")
 }

Value parameters

rawName

the name in database of the table.

Attributes

Companion
object
Source
TableDefinition.scala
Graph
Supertypes
trait TableName
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Allows you to give an alias for the table, useful in SQL joins.

Allows you to give an alias for the table, useful in SQL joins.

Example:

 val u = tables.Users as "u"
 val ic = tables.InventoryCharacters as "ic"

 val columns = MatchmakingUserRowData
 sql"""
   SELECT $columns
   FROM $u
   INNER JOIN $ic ON ${u(_.id) === ic(_.userId)} AND ${u(_.character) === ic(_.guid)}
   LIMIT 1
 """.queryOf(columns)

Attributes

Source
TableDefinition.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
TableDefinition.scala

Concrete fields

val name: Fragment

Attributes

Source
TableDefinition.scala

Attributes

Source
TableDefinition.scala