OrderedSelect

io.getquill.context.sql.norm.nested.Elements.OrderedSelect
See theOrderedSelect companion object
case class OrderedSelect(order: List[Int], selectValue: SelectValue) extends PseudoAst

In order to be able to reconstruct the original ordering of elements inside of a select clause, we need to keep track of their order, not only within the top-level select but also it's order within any possible tuples/case-classes that in which it is embedded. For example, in the query:

 query[Person].map(p => (p.id, (p.name, p.age))).nested
// SELECT p.id, p.name, p.age FROM (SELECT x.id, x.name, x.age FROM person
x) AS p 

Since the p.name and p.age elements are selected inside of a sub-tuple, their "order" is List(2,1) and List(2,2) respectively as opposed to p.id whose "order" is just List(1).

This class keeps track of the values needed in order to perform do this.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait PseudoAst
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product