com.outworkers.phantom.macros.RootMacro

TableDescriptor

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
Learn more about member selection
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)

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

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

  9. def debugMap: Tree

    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.

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

    Definition Classes
    AnyRef
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def fromRow: Option[Tree]

  13. final def getClass(): Class[_]

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

  15. def hlistNatRef(index: Int): Tree

  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. def matched: Seq[MatchedField]

  18. val matches: Seq[RecordMatch]

  19. val members: Seq[Field]

  20. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

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

  24. val referenceTerm: Option[Tree]

    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

  25. def showExtractor: String

  26. def storeMethod: Option[Tree]

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

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

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

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

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

  31. def unmatched: Seq[Unmatched]

  32. def unmatchedColumns: Seq[Field]

  33. def unmatchedValue(field: Field, ref: Tree): Tree

    Attributes
    protected[this]
  34. def valueTerm(field: MatchedField, refTerm: Option[Tree]): Tree

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

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

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

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

  39. def withoutMatch(m: RecordMatch): TableDescriptor

    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