Trait

com.github.aselab.activerecord.inner.Relations

Relation

Related Doc: package Relations

Permalink

trait Relation[T <: AR, S] extends QuerySupport[T, S]

Source
Relations.scala
Linear Supertypes
QuerySupport[T, S], AnyRef, Any
Known Subclasses
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Relation
  2. QuerySupport
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class GroupRelation1[R](groupScope: (Relation.JoinedType) ⇒ dsl.TypedExpression[R, _], havingConditions: List[(Relation.JoinedType) ⇒ dsl.LogicalBoolean] = Nil) extends Product with Serializable

    Permalink
  2. type Inc[A <: AR] = (T) ⇒ ActiveRecord.Association[T, A]

    Permalink
    Definition Classes
    QuerySupport
  3. abstract type JoinedType <: TupleN

    Permalink
    Definition Classes
    QuerySupport
  4. type TupleN = AnyRef { def _1: T }

    Permalink
    Definition Classes
    QuerySupport

Abstract Value Members

  1. abstract def copyParams[R](params: Parameters[T, JoinedType, R]): Relation[T, R]

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  2. abstract val manifest: ClassTag[T]

    Permalink
    Definition Classes
    QuerySupport
  3. abstract val parameters: Parameters[T, JoinedType, S]

    Permalink
    Definition Classes
    QuerySupport
  4. abstract val queryable: dsl.Queryable[T]

    Permalink
  5. abstract def toQuery[R](f: (JoinedType) ⇒ dsl.QueryYield[R]): dsl.Query[R]

    Permalink
    Attributes
    protected

Concrete 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 average[T2 >: dsl.TOptionFloat, T1 <: T2, A1, A2](e: (JoinedType) ⇒ dsl.TypedExpression[A1, T1])(implicit f: dsl.TypedExpressionFactory[A2, T2]): A2

    Permalink
  6. def avg[T2 >: dsl.TOptionFloat, T1 <: T2, A1, A2](e: (JoinedType) ⇒ dsl.TypedExpression[A1, T1])(implicit f: dsl.TypedExpressionFactory[A2, T2]): A2

    Permalink
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. lazy val companion: ActiveRecordBaseCompanion[_, T]

    Permalink
    Definition Classes
    QuerySupport
  9. def compute[T1](e: (JoinedType) ⇒ dsl.TypedExpression[T1, _]): T1

    Permalink
  10. def conditions: List[(JoinedType) ⇒ dsl.LogicalBoolean]

    Permalink
    Definition Classes
    QuerySupport
  11. implicit def convertFactory[A](f: dsl.TypedExpressionFactory[A, _]): dsl.TypedExpressionFactory[A, Any]

    Permalink
    Attributes
    protected
  12. def copyParams[R](conditions: List[(JoinedType) ⇒ dsl.LogicalBoolean] = parameters.conditions, orders: List[(JoinedType) ⇒ dsl.ExpressionNode] = parameters.orders, selector: (JoinedType) ⇒ R = parameters.selector, includeAssociations: List[(T) ⇒ ActiveRecord.Association[T, AR]] = parameters.includeAssociations, pages: Option[(Int, Int)] = parameters.pages, isUnique: Boolean = parameters.isUnique, isReverse: Boolean = parameters.isReverse): Relation[T, R]

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  13. def count: Long

    Permalink
  14. def deleteAll()(implicit ev: =:=[S, T]): List[T]

    Permalink
  15. def distinct: Relation.this.type

    Permalink
    Definition Classes
    QuerySupport
  16. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  18. def exists(condition: (T) ⇒ dsl.LogicalBoolean): Boolean

    Permalink
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. macro def find(id: Any): Option[S]

    Permalink
  21. macro def findAllBy(name: String, value: Any): Relation.this.type

    Permalink

    Search by fieldname and value.

    Search by fieldname and value.

    findAllBy("name", "abc")
    name

    field name

    value

    field value

  22. macro def findAllBy(conditions: (String, Any)*): Relation.this.type

    Permalink

    Search by multiple fieldnames and values.

    Search by multiple fieldnames and values.

    findAllBy("name" -> "abc", "email" -> "[email protected]")
    conditions

    fieldname-value tuples

  23. macro def findBy(name: String, value: Any): Option[S]

    Permalink

    Search by fieldname and value and return first record.

    Search by fieldname and value and return first record.

    findBy("name", "abc")
    name

    field name

    value

    field value

  24. macro def findBy(conditions: (String, Any)*): Option[S]

    Permalink

    Search by multiple fieldnames and values and return first record.

    Search by multiple fieldnames and values and return first record.

    findBy("name" -> "abc", "email" -> "[email protected]")
    conditions

    fieldname-value tuples

  25. macro def findByOrCreate(m: T, fields: String*): S

    Permalink
  26. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  27. def group[R](groupScope: (JoinedType) ⇒ dsl.TypedExpression[R, _]): GroupRelation1[R]

    Permalink
  28. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  29. def head: S

    Permalink
  30. def headOption: Option[S]

    Permalink
  31. def includeAssociations: List[(T) ⇒ ActiveRecord.Association[T, AR]]

    Permalink
    Definition Classes
    QuerySupport
  32. def includes[A1 <: AR, A2 <: AR, A3 <: AR, A4 <: AR](a1: Inc[A1], a2: Inc[A2], a3: Inc[A3], a4: Inc[A4]): Relation.this.type

    Permalink
    Definition Classes
    QuerySupport
  33. def includes[A1 <: AR, A2 <: AR, A3 <: AR](a1: Inc[A1], a2: Inc[A2], a3: Inc[A3]): Relation.this.type

    Permalink
    Definition Classes
    QuerySupport
  34. def includes[A1 <: AR, A2 <: AR](a1: Inc[A1], a2: Inc[A2]): Relation.this.type

    Permalink
    Definition Classes
    QuerySupport
  35. def includes[A <: AR](association: Inc[A]): Relation.this.type

    Permalink
    Definition Classes
    QuerySupport
  36. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  37. def isLoaded: Boolean

    Permalink
  38. def isReverse: Boolean

    Permalink
    Definition Classes
    QuerySupport
  39. def isUnique: Boolean

    Permalink
    Definition Classes
    QuerySupport
  40. def last: S

    Permalink
  41. def lastOption: Option[S]

    Permalink
  42. def limit(count: Int): Relation.this.type

    Permalink

    returns limited results.

    returns limited results.

    Post.all.orderBy(p => p.updatedAt desc).limit(10)
    count

    max count

    Definition Classes
    QuerySupport
  43. def load(implicit m: ClassTag[S]): List[S]

    Permalink
  44. def max[T2 >: dsl.TOption, T1 <: T2, A1, A2](e: (JoinedType) ⇒ dsl.TypedExpression[A1, T1])(implicit f: dsl.TypedExpressionFactory[A2, T2]): A2

    Permalink
  45. def maximum[T2 >: dsl.TOption, T1 <: T2, A1, A2](e: (JoinedType) ⇒ dsl.TypedExpression[A1, T1])(implicit f: dsl.TypedExpressionFactory[A2, T2]): A2

    Permalink
  46. def min[T2 >: dsl.TOption, T1 <: T2, A1, A2](e: (JoinedType) ⇒ dsl.TypedExpression[A1, T1])(implicit f: dsl.TypedExpressionFactory[A2, T2]): A2

    Permalink
  47. def minimum[T2 >: dsl.TOption, T1 <: T2, A1, A2](e: (JoinedType) ⇒ dsl.TypedExpression[A1, T1])(implicit f: dsl.TypedExpressionFactory[A2, T2]): A2

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

    Permalink
    Definition Classes
    AnyRef
  49. def not(condition: (T) ⇒ dsl.LogicalBoolean): Relation.this.type

    Permalink
    Definition Classes
    QuerySupport
  50. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  52. def orderBy(name: String, order: String): Relation.this.type

    Permalink
  53. def orderBy(conditions: (T) ⇒ dsl.ExpressionNode*): Relation.this.type

    Permalink
    Definition Classes
    QuerySupport
  54. def orders: List[(JoinedType) ⇒ dsl.ExpressionNode]

    Permalink
    Definition Classes
    QuerySupport
  55. def ordersExpression(m: JoinedType): List[dsl.ExpressionNode]

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  56. def page(offset: Int, count: Int): Relation.this.type

    Permalink

    returns page results.

    returns page results.

    Post.all.orderBy(p => p.updatedAt desc).page(10 * (pageNumber - 1), 10)
    offset

    offset count

    count

    max count

    Definition Classes
    QuerySupport
  57. def pages: Option[(Int, Int)]

    Permalink
    Definition Classes
    QuerySupport
  58. def paginate[R](query: dsl.Query[R]): Query[R]

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  59. implicit def relationToThisType[R](self: Relation[T, R]): Relation.this.type

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  60. def reload(implicit m: ClassTag[S]): List[S]

    Permalink
  61. def reverse: Relation.this.type

    Permalink
    Definition Classes
    QuerySupport
  62. def reverseOrder(m: JoinedType): List[dsl.OrderByExpression]

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  63. def select[R](selector: (T) ⇒ R): Relation[T, R]

    Permalink
    Definition Classes
    QuerySupport
  64. def selector: (JoinedType) ⇒ S

    Permalink
    Definition Classes
    QuerySupport
  65. def sum[T2 >: dsl.TOption, T1 >: dsl.TNumericLowerTypeBound <: T2, A1, A2](e: (JoinedType) ⇒ dsl.TypedExpression[A1, T1])(implicit f: dsl.TypedExpressionFactory[A2, T2]): A2

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

    Permalink
    Definition Classes
    AnyRef
  67. def toQuery: dsl.Query[S]

    Permalink
  68. def toSql: String

    Permalink
  69. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  70. def unsafeFindAllBy(condition: (String, Any), conditions: (String, Any)*): Relation.this.type

    Permalink

    Search by fieldname and value.

    Search by fieldname and value.

    unsafeFindAllBy("name", "abc")
  71. def unsafeFindAllBy(name: String, value: Any): Relation.this.type

    Permalink

    Search by fieldname and value.

    Search by fieldname and value.

    unsafeFindAllBy("name", "abc")
    name

    field name

    value

    field value

  72. def unsafeFindBy(condition: (String, Any), conditions: (String, Any)*): Option[S]

    Permalink

    Search by multiple fieldnames and values and return first record.

    Search by multiple fieldnames and values and return first record.

    unsafeFindBy("name" -> "abc", "email" -> "[email protected]")
    condition

    fieldname-value tuple

    conditions

    multiple fieldname-value tuples(optional)

  73. def unsafeFindByOrCreate(m: T, field: String, fields: String*)(implicit ev: =:=[T, S]): S

    Permalink
  74. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  77. def where(condition: (T) ⇒ dsl.LogicalBoolean): Relation.this.type

    Permalink
    Definition Classes
    QuerySupport
  78. def whereScope(m: JoinedType): WhereState[_ >: Unconditioned with Conditioned <: AnyRef]

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  79. def wrap[A <: TupleN, R](f: (T) ⇒ R): (A) ⇒ R

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  80. def wrapTuple1[A <: TupleN, R](f: ((T)) ⇒ R): (A) ⇒ R

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport

Inherited from QuerySupport[T, S]

Inherited from AnyRef

Inherited from Any

Ungrouped