Class/Object

io.getquill.ast

Entity

Related Docs: object Entity | package ast

Permalink

case class Entity(name: String, properties: List[PropertyAlias]) extends Query with Product with Serializable

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 PropertyAliass. 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.

SELECT p.name FROM People p 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`.

Linear Supertypes
Serializable, Serializable, Product, Equals, Query, Ast, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Entity
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Query
  7. Ast
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Entity(name: String, properties: List[PropertyAlias])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(that: Any): Boolean

    Permalink
    Definition Classes
    Entity → Equals → AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    Entity → AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. val name: String

    Permalink
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. def neutral: Entity

    Permalink

    Return a copy of this AST element with any opinions that it may have set to their neutral position.

    Return a copy of this AST element with any opinions that it may have set to their neutral position. Return the object itself if it has no opinions.

    Definition Classes
    EntityAst
  15. final def neutralize: Ast

    Permalink

    Set all opinions of this element and every element in the subtree to the neutral position.

    Set all opinions of this element and every element in the subtree to the neutral position.

    Definition Classes
    Ast
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. val properties: List[PropertyAlias]

    Permalink
  19. def renameable: Renameable

    Permalink
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    Ast → AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Query

Inherited from Ast

Inherited from AnyRef

Inherited from Any

Ungrouped