io.getquill.ast.Entity
See theEntity companion object
final class Entity(val name: String, val properties: List[PropertyAlias])(theQuat: => Product)(val renameable: Renameable) extends Query
Entities represent the actual tables/views being selected. Typically, something like:
`SELECT p.name FROM People p`
comes from something like:
`Map(Entity("People", Nil), Ident("p"), Property(Ident(p), "name"))`.
When you define a querySchema
, the fields you mention inside become PropertyAlias
s. For example something like:
`querySchema[Person]("t_person", _.name -> "s_name")`
Becomes something like:
`Entity("t_person", List(PropertyAlias(List("name"), "s_name"))) { def renameable = Fixed }`
Note that Entity has an Opinion called renameable
which will be the value Fixed
when a querySchema
is specified. That means that even if the NamingSchema
is UpperCase
, the resulting query will select t_person
as opposed to T_PERSON
or Person
.
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
In this article