ColumnOption

slick.sql.SqlProfile.ColumnOption
object ColumnOption

Extra column options for SqlProfile

Attributes

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

Members list

Type members

Classlikes

case object NotNull extends ColumnOption[Nothing]

Attributes

Source
SqlProfile.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class ColumnOption[Nothing]
class Object
trait Matchable
class Any
Show all
Self type
NotNull.type
case object Nullable extends ColumnOption[Nothing]

Attributes

Source
SqlProfile.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class ColumnOption[Nothing]
class Object
trait Matchable
class Any
Show all
Self type
Nullable.type
case class SqlType(typeName: String) extends ColumnOption[Nothing]

Type as expected by the DBMS, e.g. VARCHAR or VARCHAR(254). Note that Slick's model omits the optional length ascription for string columns here and carries the length in the separate ColumnOption Length instead. A length ascription for string column is allowed though and can be used in a Slick Table subclass to pass it to the DBMS. As this is the type of the underlying DBMS it may not be portable to other DBMS.

Type as expected by the DBMS, e.g. VARCHAR or VARCHAR(254). Note that Slick's model omits the optional length ascription for string columns here and carries the length in the separate ColumnOption Length instead. A length ascription for string column is allowed though and can be used in a Slick Table subclass to pass it to the DBMS. As this is the type of the underlying DBMS it may not be portable to other DBMS.

Note that Slick uses VARCHAR or VARCHAR(254) in DDL for String columns if neither ColumnOption DBType nor Length are given.

Attributes

Source
SqlProfile.scala
Supertypes
trait Serializable
trait Product
trait Equals
class ColumnOption[Nothing]
class Object
trait Matchable
class Any
Show all