Defines the primary interface by which information in Quill is composed.
Defines the primary interface by which information in Quill is composed. This includes not only
queries but all code fragements.
A quotation can be a simple value:
{{
val pi = quote(3.14159)
}}
And be used within another quotation:
{{
case class Circle(radius: Float)
val areas = quote {
query[Circle].map(c => pi * c.radius * c.radius)
}
}}
Quotations can also contain high-order functions and inline values:
{{
val area = quote {
(c: Circle) => {
val r2 = c.radius * c.radius
pi * r2
}
}
val areas = quote {
query[Circle].map(c => area(c))
}
}}
Note that this class must not be in quill-engine since it cannot be shared with ProtoQuill and which
has a different implementation of Quoted.
Defines the primary interface by which information in Quill is composed. This includes not only queries but all code fragements. A quotation can be a simple value: {{ val pi = quote(3.14159) }} And be used within another quotation: {{ case class Circle(radius: Float)
val areas = quote { query[Circle].map(c => pi * c.radius * c.radius) } }} Quotations can also contain high-order functions and inline values: {{ val area = quote { (c: Circle) => { val r2 = c.radius * c.radius pi * r2 } } val areas = quote { query[Circle].map(c => area(c)) } }}
Note that this class must not be in quill-engine since it cannot be shared with ProtoQuill and which has a different implementation of Quoted.
Scala 3.1.1 fails to compile / no method options for more info.