TableSpec

io.eezo.db.TableSpec
final class TableSpec[T](val table: Table[T])

Attributes

Source
Schema.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def index(sel: ColsOf[T] => Col[T, _]*): this.type

index(_.author, _.publishedOn). BACKLOG §7.

index(_.author, _.publishedOn). BACKLOG §7.

Two payoffs over the strings this replaced. Renaming or deleting a field is now a compile error at the index rather than a SchemaError thrown when the schema is first forced. And the _id suffix on a Ref column is the framework's job: the selector names the field, the Col it returns knows the column.

The arrow is ->, not =>: a column selector captures nothing, and saying so is what lets a vararg of them be used at all — an impure function in varargs leaks its reach capability out of the method. Same reason Column.imap takes pure arrows.

Attributes

Source
Schema.scala
def indexes: List[IndexSnap]

Attributes

Source
Schema.scala

Attributes

Source
Schema.scala
def unique(sel: ColsOf[T] => Col[T, _]*): this.type

Attributes

Source
Schema.scala

Concrete fields

val table: Table[T]

Attributes

Source
Schema.scala