com.websudos.morpheus.dsl

BaseTable

abstract class BaseTable[Owner <: BaseTable[Owner, Record], Record] extends AnyRef

The basic wrapper definition of an SQL table. This will force greedy initialisation of all column object members and provide a way to map the basic DSL table definition into a user defined Scala case class.

Greedy object initialisation is done in a thread safe way via a global lock acquired on a singleton case object, preventing race conditions on multiple threads accessing the same table during initialisation.

Unlike the Java reflection API, which cannot guarantee any ordering in a compiled bytecode file of object members, the Scala reflection API is capable of extracting objects in the order the user writes them inside a table definition. This is a very important guarantee allowing for consistency throughout the DSL and auto-generating table schemas where order is important.

Owner

The Owner type of the table, pointing to the extending class defining a table. Used as follows: class SomeTable extends Table[SomeTable, SomeRecord]

Record

The user defined Scala class, usually a case class, holding a type safe data model definition. This allows for type safe querying of records, as all select all queries will return an instance of Record.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BaseTable
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BaseTable()

Abstract Value Members

  1. abstract def create: RootCreateQuery[Owner, Record]

  2. abstract def delete: RootDeleteQuery[Owner, Record]

  3. abstract def fromRow(row: Row): Record

    The most notable and honorable of functions in this file, this is what allows our DSL to provide type-safety.

    The most notable and honorable of functions in this file, this is what allows our DSL to provide type-safety. It works by requiring a user to define a type-safe mapping between a buffered Result and the above refined Record.

    Objects delimiting pre-defined columns also have a pre-defined "apply" method, allowing the user to simply autofill the type-safe mapping by using pre-existing definitions.

    row

    The row incoming as a result from a MySQL query.

    returns

    A Record instance.

  4. abstract def insert: RootInsertQuery[Owner, Record]

  5. abstract val queryBuilder: AbstractQueryBuilder

  6. abstract def syntax: AbstractSQLSyntax

    Attributes
    protected[this]
  7. abstract def update: RootUpdateQuery[Owner, Record]

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def columns: List[AbstractColumn[_]]

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  19. def tableName: String

  20. def toString(): String

    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped