Trait

com.github.aselab.activerecord.inner.Relations

Relation

Related Doc: package Relations

Permalink

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

Source
Relations.scala
Linear Supertypes
PagerSupport[T, S], QuerySupport[T, S], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Relation
  2. PagerSupport
  3. QuerySupport
  4. AnyRef
  5. 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
    @HotSpotIntrinsicCandidate() @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. lazy val currentPage: Int

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

    Permalink
  16. def distinct: Relation.this.type

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

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

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

    Permalink
  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
    Annotations
    @HotSpotIntrinsicCandidate()
  27. def group[R](groupScope: (JoinedType) ⇒ dsl.TypedExpression[R, _]): GroupRelation1[R]

    Permalink
  28. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  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. def isEmpty: Boolean

    Permalink
  37. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  38. def isLoaded: Boolean

    Permalink
  39. def isReverse: Boolean

    Permalink
    Definition Classes
    QuerySupport
  40. def isUnique: Boolean

    Permalink
    Definition Classes
    QuerySupport
  41. def last: S

    Permalink
  42. def lastOption: Option[S]

    Permalink
  43. 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
  44. def load(implicit m: ClassTag[S]): List[S]

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

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

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

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

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

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

    Permalink
    Definition Classes
    PagerSupport
  51. def nonEmpty: Boolean

    Permalink
  52. def not(condition: (T) ⇒ dsl.LogicalBoolean): Relation.this.type

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  54. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  55. def orderBy(name: String, order: String): Relation.this.type

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

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport
  62. lazy val previousPage: Option[Int]

    Permalink
    Definition Classes
    PagerSupport
  63. implicit def relationToThisType[R](self: Relation[T, R]): Relation.this.type

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

    Permalink
  65. def reverse: Relation.this.type

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

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

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

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

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

    Permalink
  72. def toSql: String

    Permalink
  73. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  74. lazy val totalPages: Int

    Permalink
    Definition Classes
    PagerSupport
  75. 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")
  76. 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

  77. 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)

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

    Permalink
  79. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  81. final def wait(): Unit

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

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

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

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

    Permalink
    Attributes
    protected
    Definition Classes
    QuerySupport

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from PagerSupport[T, S]

Inherited from QuerySupport[T, S]

Inherited from AnyRef

Inherited from Any

Ungrouped