Given a base projection, returns the projection based on it if applicable.
Given a base projection, returns the projection based on it if applicable.
For instance, given a quoted function
val contact = Quoted.function { (c: Contact) => c.contact }
and a call
(p: Person) => contact(p.name)
produces the projection
Person.name.contact
Limits projections to only values of superClass
.
Limits projections to only values of superClass
. Example:
case class Person(name: String, contact: Contact) extends ThriftObject case class Contact(phone: Phone) extends ThriftObject case class Phone(number: String)
For the super class ThriftObject
, it produces the transformations:
Person.contact.phone => Some(Person.contact.phone) Person.contact.phone.number => Some(Person.contact.phone) Person.name.isEmpty => Some(Person.name) Phone.number => None
A projection property (e.g.
Person.name
)