com.outworkers.phantom.macros.RootMacro
Creates a map to show users how record fields map to columns inside the table.
Creates a map to show users how record fields map to columns inside the table. This is done when they want to inspect the generated macro trees and report bugs and as a convenience feature for us at debugging time.
An interpolated quoted tree that contains a String definition.
The reference term is a tuple field pointing to the tuple index found on a store type.
The reference term is a tuple field pointing to the tuple index found on a store type. If the Cassandra table has more columns than the record field, such as when users chose to store a denormalised variant of a record indexed by a new ID, the store input type will become a tuple of that ID and the record type.
So in effect:
case class Record(name: String, timestamp: DateTime) class Records extends CassandraTable[Records, Record] { object id extends UUIDColumn with PartitionKey object name extends StringColumn with PrimaryKey object timestamp extends DateTimeColumn // Will end up with a store method that has the following type signature. def store(input: (UUID, Record)): InsertQuery.Default[Records, Record] }
In these scenarios, we need a way to refer to input._index as part of the generated store method, where the numerical value of the tuple index is equal to the number of unmatched columns(found in the table but not the record) plus one more for the record type itself and another to compensate for tuples being indexed from 1 instead of 0.
An optional TermName of the form TermName
Automatically creates a shapeless.HList from the types found in a table as described in the documentation.
Short cut method to create a full CQL query using the a particular column inside a table.
Short cut method to create a full CQL query using the a particular column inside a table. This will create something like the folloing:
com.outworkers.phantom.
This is just done for the naming convenience, but the functionality of distinguishing between matched and unmatched is implemented using an ADT and collect, so it doesn't actually matter if we append to the same place.
This is just done for the naming convenience, but the functionality of distinguishing between matched and unmatched is implemented using an ADT and collect, so it doesn't actually matter if we append to the same place.
The record match.
An immutable copy of the table descriptor with one extra unmatched record.