Class

com.github.aselab.activerecord.inner.Relations

Relation2

Related Doc: package Relations

Permalink

case class Relation2[T <: AR, J1 <: AR, S](parameters: Parameters[T, (T, J1), S], queryable: dsl.Queryable[T], joinTable: dsl.Queryable[J1], on: ((T, J1)) ⇒ 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], PagerSupport[T, S], QuerySupport[T, S], AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Relation2
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Relation
  7. PagerSupport
  8. QuerySupport
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Relation2(parameters: Parameters[T, (T, J1), S], queryable: dsl.Queryable[T], joinTable: dsl.Queryable[J1], on: ((T, J1)) ⇒ 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)

    Permalink
    Definition Classes
    Relation2QuerySupport
  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]): Relation2[T, J1, R]

    Permalink
    Attributes
    protected
    Definition Classes
    Relation2QuerySupport
  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. lazy val currentPage: Int

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

    Permalink
    Definition Classes
    Relation
  17. def distinct: Relation2.this.type

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

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

    Permalink
    Definition Classes
    Relation
  20. def finalize(): Unit

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

    Permalink
    Definition Classes
    Relation
  22. macro def findAllBy(name: String, value: Any): Relation2.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
  23. macro def findAllBy(conditions: (String, Any)*): Relation2.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
  24. 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
  25. 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
  26. macro def findByOrCreate(m: T, fields: String*): S

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

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

    Permalink
    Definition Classes
    Relation
  29. def head: S

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

    Permalink
    Definition Classes
    Relation
  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]): Relation2.this.type

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

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

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

    Permalink
    Definition Classes
    QuerySupport
  36. def isEmpty: Boolean

    Permalink
    Definition Classes
    Relation
  37. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  38. def isLoaded: Boolean

    Permalink
    Definition Classes
    Relation
  39. def isReverse: Boolean

    Permalink
    Definition Classes
    QuerySupport
  40. def isUnique: Boolean

    Permalink
    Definition Classes
    QuerySupport
  41. val joinTable: dsl.Queryable[J1]

    Permalink
  42. def last: S

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

    Permalink
    Definition Classes
    Relation
  44. def limit(count: Int): Relation2.this.type

    Permalink

    returns limited results.

    returns limited results.

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

    max count

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

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

    Permalink
    Definition Classes
    Relation2QuerySupport
  47. 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
  48. 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
  49. 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
  50. 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
  51. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  52. lazy val nextPage: Option[Int]

    Permalink
    Definition Classes
    PagerSupport
  53. def nonEmpty: Boolean

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

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

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

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

    Permalink
  58. def orderBy(conditions: (T, J1) ⇒ dsl.ExpressionNode*): Relation2.this.type

    Permalink
  59. def orderBy(name: String, order: String): Relation2.this.type

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

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

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

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

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

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

    Permalink
    Definition Classes
    Relation2QuerySupport
  67. lazy val previousPage: Option[Int]

    Permalink
    Definition Classes
    PagerSupport
  68. val queryable: dsl.Queryable[T]

    Permalink
    Definition Classes
    Relation2Relation
  69. implicit def relationToThisType[R](self: Relation[T, R]): Relation2.this.type

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

    Permalink
    Definition Classes
    Relation
  71. def reverse: Relation2.this.type

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

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    Relation2Relation
  79. def toQuery: dsl.Query[S]

    Permalink
    Definition Classes
    Relation
  80. def toSql: String

    Permalink
    Definition Classes
    Relation
  81. lazy val totalPages: Int

    Permalink
    Definition Classes
    PagerSupport
  82. def unsafeFindAllBy(condition: (String, Any), conditions: (String, Any)*): Relation2.this.type

    Permalink

    Search by fieldname and value.

    Search by fieldname and value.

    unsafeFindAllBy("name", "abc")
    Definition Classes
    Relation
  83. def unsafeFindAllBy(name: String, value: Any): Relation2.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
  84. 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
  85. def unsafeFindByOrCreate(m: T, field: String, fields: String*)(implicit ev: =:=[T, S]): S

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

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

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

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

    Permalink
  90. def where(condition: (T) ⇒ dsl.LogicalBoolean): Relation2.this.type

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  93. 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 PagerSupport[T, S]

Inherited from QuerySupport[T, S]

Inherited from AnyRef

Inherited from Any

Ungrouped