Class/Object

com.outworkers.phantom.macros.RootMacro

TableDescriptor

Related Docs: object TableDescriptor | package RootMacro

Permalink

case class TableDescriptor(tableTpe: scala.reflect.macros.Universe.Type, recordType: scala.reflect.macros.Universe.Type, members: Seq[Field], matches: Seq[RecordMatch] = immutable.this.Nil) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TableDescriptor
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TableDescriptor(tableTpe: scala.reflect.macros.Universe.Type, recordType: scala.reflect.macros.Universe.Type, members: Seq[Field], matches: Seq[RecordMatch] = immutable.this.Nil)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def debugList(fields: Seq[RootField]): Seq[String]

    Permalink
  7. def debugMap: scala.reflect.macros.Universe.Tree

    Permalink

    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.

    returns

    An interpolated quoted tree that contains a String definition.

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def fromRow: Option[scala.reflect.macros.Universe.Tree]

    Permalink
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hListStoreType: Option[scala.reflect.macros.Universe.Type]

    Permalink
  13. def hlistNatRef(index: Int): scala.reflect.macros.Universe.Tree

    Permalink
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. def matched: Seq[MatchedField]

    Permalink
  16. val matches: Seq[RecordMatch]

    Permalink
  17. val members: Seq[Field]

    Permalink
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. val recordType: scala.reflect.macros.Universe.Type

    Permalink
  22. val referenceTerm: Option[scala.reflect.macros.Universe.Tree]

    Permalink

    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.

    returns

    An optional TermName of the form TermName

  23. def showExtractor: String

    Permalink
  24. def storeMethod: Option[scala.reflect.macros.Universe.Tree]

    Permalink
  25. def storeType: Option[scala.reflect.macros.Universe.Type]

    Permalink

    Automatically creates a shapeless.HList from the types found in a table as described in the documentation.

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def tableField(fieldName: scala.reflect.macros.Universe.TermName): scala.reflect.macros.Universe.Tree

    Permalink

    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.
  28. val tableTpe: scala.reflect.macros.Universe.Type

    Permalink
  29. def unmatched: Seq[Unmatched]

    Permalink
  30. def unmatchedColumns: Seq[Field]

    Permalink
  31. def unmatchedValue(field: Field, ref: scala.reflect.macros.Universe.Tree): scala.reflect.macros.Universe.Tree

    Permalink
    Attributes
    protected[this]
  32. def valueTerm(field: MatchedField, refTerm: Option[scala.reflect.macros.Universe.Tree]): scala.reflect.macros.Universe.Tree

    Permalink
    Attributes
    protected[this]
  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def withMatch(m: RecordMatch): TableDescriptor

    Permalink
  37. def withoutMatch(m: RecordMatch): TableDescriptor

    Permalink

    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.

    m

    The record match.

    returns

    An immutable copy of the table descriptor with one extra unmatched record.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped