Add a new TransientRelation extends Relation for providing a fluent interface for dealing with Relations. Instantiation of TransientRelations should be only possible within the framework. It must not be visible outside of the framework as it only provides an implementation of all Relation's functions.
Problem Description
Most functions of Relation just return a Seq[Records]. So method chaining is not possible and we must fallback to functions on Seq:
val result: Seq[Records] = User
.where(User.id => { _ == 22 })
.map(_.project(Seq(User.id, User.name)).get)
.sortBy(_.get(User.name))
Supporting Information
Desired syntax:
val result: Seq[Records] = User
.where(User.id => { _ == 22 })
.project(Seq(User.id, User.name))
.orderBy(User.name)
.records
Issue
Add a new
TransientRelation extends Relation
for providing a fluent interface for dealing withRelation
s. Instantiation ofTransientRelation
s should be only possible within the framework. It must not be visible outside of the framework as it only provides an implementation of allRelation
's functions.Problem Description
Most functions of
Relation
just return aSeq[Records]
. So method chaining is not possible and we must fallback to functions onSeq
:Supporting Information
Desired syntax: