Class

com.github.aselab.activerecord.inner.Relations

Relation3

Related Doc: package Relations

Permalink

case class Relation3[T <: AR, J1 <: AR, J2 <: AR, S](parameters: Parameters[T, (T, J1, J2), S], queryable: dsl.Queryable[T], joinTable1: dsl.Queryable[J1], joinTable2: dsl.Queryable[J2], on: ((T, J1, J2)) ⇒ (dsl.LogicalBoolean, dsl.LogicalBoolean))(implicit manifest: ClassTag[T]) extends Relation[T, S] with Product with Serializable

Source
Relations.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, Relation[T, S], QuerySupport[T, S], AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Relation3
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Relation
  7. QuerySupport
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Relation3(parameters: Parameters[T, (T, J1, J2), S], queryable: dsl.Queryable[T], joinTable1: dsl.Queryable[J1], joinTable2: dsl.Queryable[J2], on: ((T, J1, J2)) ⇒ (dsl.LogicalBoolean, dsl.LogicalBoolean))(implicit manifest: ClassTag[T])

    Permalink

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
    Definition Classes
    Relation
  2. type Inc[A <: AR] = (T) ⇒ ActiveRecord.Association[T, A]

    Permalink
    Definition Classes
    QuerySupport
  3. type JoinedType = (T, J1, J2)

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

    Permalink
    Definition Classes
    QuerySupport

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
    Definition Classes
    Relation
  6. def avg[T2 >: dsl.TOptionFloat, T1 <: T2, A1, A2](e: (JoinedType) ⇒ dsl.TypedExpression[A1, T1])(implicit f: dsl.TypedExpressionFactory[A2, T2]): A2

    Permalink
    Definition Classes
    Relation
  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
    Definition Classes
    Relation
  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
    Definition Classes
    Relation
  12. def copyParams[R](params: Parameters[T, JoinedType, R]): Relation3[T, J1, J2, R]

    Permalink
    Attributes
    protected
    Definition Classes
    Relation3QuerySupport
  13. 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
  14. def count: Long

    Permalink
    Definition Classes
    Relation
  15. def deleteAll()(implicit ev: =:=[S, T]): List[T]

    Permalink
    Definition Classes
    Relation
  16. def distinct: Relation3.this.type

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

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

    Permalink
    Definition Classes
    Relation
  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
    Definition Classes
    Relation
  21. macro def findAllBy(name: String, value: Any): Relation3.this.type

    Permalink

    Search by fieldname and value.

    Search by fieldname and value.

    findAllBy("name", "abc")
    name

    field name

    value

    field value

    Definition Classes
    Relation
  22. macro def findAllBy(conditions: (String, Any)*): Relation3.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

    Definition Classes
    Relation
  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

    Definition Classes
    Relation
  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

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

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

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

    Permalink
    Definition Classes
    Relation
  28. def head: S

    Permalink
    Definition Classes
    Relation
  29. def headOption: Option[S]

    Permalink
    Definition Classes
    Relation
  30. def includeAssociations: List[(T) ⇒ ActiveRecord.Association[T, AR]]

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  36. def isLoaded: Boolean

    Permalink
    Definition Classes
    Relation
  37. def isReverse: Boolean

    Permalink
    Definition Classes
    QuerySupport
  38. def isUnique: Boolean

    Permalink
    Definition Classes
    QuerySupport
  39. val joinTable1: dsl.Queryable[J1]

    Permalink
  40. val joinTable2: dsl.Queryable[J2]

    Permalink
  41. def last: S

    Permalink
    Definition Classes
    Relation
  42. def lastOption: Option[S]

    Permalink
    Definition Classes
    Relation
  43. def limit(count: Int): Relation3.this.type

    Permalink

    returns limited results.

    returns limited results.

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

    max count

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

    Permalink
    Definition Classes
    Relation
  45. implicit val manifest: ClassTag[T]

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

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

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

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

    Permalink
    Definition Classes
    Relation
  50. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef
  54. val on: ((T, J1, J2)) ⇒ (dsl.LogicalBoolean, dsl.LogicalBoolean)

    Permalink
  55. def orderBy(conditions: (T, J1, J2) ⇒ dsl.ExpressionNode*): Relation3.this.type

    Permalink
  56. def orderBy(name: String, order: String): Relation3.this.type

    Permalink
    Definition Classes
    Relation
  57. def orderBy(conditions: (T) ⇒ dsl.ExpressionNode*): Relation3.this.type

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  60. def page(offset: Int, count: Int): Relation3.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
  61. def pages: Option[(Int, Int)]

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

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  63. val parameters: Parameters[T, (T, J1, J2), S]

    Permalink
    Definition Classes
    Relation3QuerySupport
  64. val queryable: dsl.Queryable[T]

    Permalink
    Definition Classes
    Relation3Relation
  65. implicit def relationToThisType[R](self: Relation[T, R]): Relation3.this.type

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

    Permalink
    Definition Classes
    Relation
  67. def reverse: Relation3.this.type

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

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

    Permalink
  70. def select[R](selector: (T) ⇒ R): Relation[T, R]

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

    Permalink
    Definition Classes
    QuerySupport
  72. 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
    Definition Classes
    Relation
  73. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  74. def toQuery[R](f: (JoinedType) ⇒ dsl.QueryYield[R]): dsl.Query[R]

    Permalink
    Attributes
    protected
    Definition Classes
    Relation3Relation
  75. def toQuery: dsl.Query[S]

    Permalink
    Definition Classes
    Relation
  76. def toSql: String

    Permalink
    Definition Classes
    Relation
  77. def unsafeFindAllBy(condition: (String, Any), conditions: (String, Any)*): Relation3.this.type

    Permalink

    Search by fieldname and value.

    Search by fieldname and value.

    unsafeFindAllBy("name", "abc")
    Definition Classes
    Relation
  78. def unsafeFindAllBy(name: String, value: Any): Relation3.this.type

    Permalink

    Search by fieldname and value.

    Search by fieldname and value.

    unsafeFindAllBy("name", "abc")
    name

    field name

    value

    field value

    Definition Classes
    Relation
  79. 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)

    Definition Classes
    Relation
  80. def unsafeFindByOrCreate(m: T, field: String, fields: String*)(implicit ev: =:=[T, S]): S

    Permalink
    Definition Classes
    Relation
  81. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  84. def where(condition: (T, J1, J2) ⇒ dsl.LogicalBoolean): Relation3.this.type

    Permalink
  85. def where(condition: (T) ⇒ dsl.LogicalBoolean): Relation3.this.type

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Relation[T, S]

Inherited from QuerySupport[T, S]

Inherited from AnyRef

Inherited from Any

Ungrouped