Attributes
- Companion
- class
- Source
- Table.scala
- Graph
-
- Supertypes
- Self type
-
Table.type
Members list
Type members
Inherited and Abstract types
The names of the product elements.
The name of the type.
Value members
Concrete methods
Derives a Table from A's schema using the default naming policy (TableNamingPolicy.Singular, i.e. CamelCase → snake_case singular).
Derives a Table from A's schema using the default naming policy (TableNamingPolicy.Singular, i.e. CamelCase → snake_case singular).
The table name can be overridden by annotating A with @Modifier.config("sql.table_name", "my_table").
For compile-time SQL dumps, pair with Dump.dumpTable:
case class User(id: Int, name: String)
object User { implicit val schema: Schema[User] = Schema.derived }
val userTable = Table.derived[User]
Dump.dumpTable(userTable) // emits user-postgresql.sql / user-sqlite.sql when -Dzib.sql.dumpDir is set
Attributes
- Source
- Table.scala
Derives a Table from A's schema with an explicit table name, bypassing both the schema annotation and the naming policy.
Derives a Table from A's schema with an explicit table name, bypassing both the schema annotation and the naming policy.
Attributes
- Source
- Table.scala
Derives a Table from A's schema using the supplied naming policy to compute the table name (unless overridden by a @Modifier.config annotation).
Derives a Table from A's schema using the supplied naming policy to compute the table name (unless overridden by a @Modifier.config annotation).
Attributes
- Source
- Table.scala