Elements

io.getquill.context.sql.norm.nested.Elements
object Elements

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Elements.type

Members list

Type members

Classlikes

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:

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
Supertypes
trait Serializable
trait Product
trait Equals
trait PseudoAst
class Object
trait Matchable
class Any
Show all
object OrderedSelect

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type