AliasedTableDefinition
Result of TableDefinition.as.
Value parameters
- alias
-
the alias of the table, for example "u".
- name
-
the name of the table with the alias, for example "users AS u".
- original
-
the original TableDefinition.
Attributes
- Source
- TableDefinition.scala
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
alias as a Fragment.
Attributes
- Source
- TableDefinition.scala
Allows you to prefix column names with the alias in the SQL definitions.
Allows you to prefix column names with the alias in the SQL definitions.
Example:
val u = tables.Users as "u"
u.c(_.complexSqlDefinition).sql == sql"u.name, u.surname, u.age"
Attributes
- Source
- TableDefinition.scala
Attributes
- Source
- TableDefinition.scala
Shorthand for original.
Deprecated methods
Allows you to prefix column names with the alias in the SQL definitions.
Allows you to prefix column names with the alias in the SQL definitions.
c
stands for column
.
Example:
val u = tables.Users as "u"
u.c(_.id).name == sql"u.${u.original.id.name}"
Attributes
- Deprecated
-
[Since version 0.4.0]
- Source
- TableDefinition.scala
Inherited methods
Generates the SQL for INSERT INTO table (column1, column2, ...) VALUES (value1, value2, ...)
.
Generates the SQL for INSERT INTO table (column1, column2, ...) VALUES (value1, value2, ...)
.
Example:
tables.InventoryCharacters.insertInto(NonEmptyVector.of(
tables.InventoryCharacters.userId --> c.userId,
tables.InventoryCharacters.guid --> c.guid
))
Attributes
- Inherited from:
- TableName
- Source
- TableDefinition.scala
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Overload of updateTable for convenience.
Overload of updateTable for convenience.
Attributes
- Inherited from:
- TableName
- Source
- TableDefinition.scala
Generates the SQL for UPDATE table SET column1 = value1, column2 = value2, ...
.
Generates the SQL for UPDATE table SET column1 = value1, column2 = value2, ...
.
Example:
tables.InventoryCharacters.updateTable(NonEmpty.createVector(
tables.InventoryCharacters.handgun1 --> loadouts.sets.set1.weapons.handgun,
tables.InventoryCharacters.handgun2 --> loadouts.sets.set2.weapons.handgun
))
Attributes
- Inherited from:
- TableName
- Source
- TableDefinition.scala