com.websudos.phantom.builder.query

SelectQuery

class SelectQuery[Table <: CassandraTable[Table, _], Record, Limit <: LimitBound, Order <: OrderBound, Status <: ConsistencyBound, Chain <: WhereBound, PS <: HList] extends Query[Table, Record, Limit, Order, Status, Chain, PS] with ExecutableQuery[Table, Record, Limit]

Linear Supertypes
ExecutableQuery[Table, Record, Limit], RootExecutableQuery[Record], Query[Table, Record, Limit, Order, Status, Chain, PS], ExecutableStatement, CassandraOperations, SessionAugmenterImplicits, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SelectQuery
  2. ExecutableQuery
  3. RootExecutableQuery
  4. Query
  5. ExecutableStatement
  6. CassandraOperations
  7. SessionAugmenterImplicits
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SelectQuery(table: Table, rowFunc: (Row) ⇒ Record, init: CQLQuery, wherePart: WherePart = WherePart.empty, orderPart: OrderPart = OrderPart.empty, limitedPart: LimitedPart = LimitedPart.empty, filteringPart: FilteringPart = FilteringPart.empty, usingPart: UsingPart = UsingPart.empty, count: Boolean = false, options: QueryOptions = QueryOptions.empty)

Type Members

  1. type Modifier = (Statement) ⇒ Statement

    Definition Classes
    ExecutableStatement
  2. type QueryType[T <: CassandraTable[T, _], R, L <: LimitBound, O <: OrderBound, S <: ConsistencyBound, C <: WhereBound, P <: HList] = SelectQuery[T, R, L, O, S, C, P]

    Attributes
    protected[this]
    Definition Classes
    SelectQueryQuery
  3. implicit class RichSession extends SessionAugmenter

    Definition Classes
    SessionAugmenterImplicits

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. def allowFiltering(): SelectQuery[Table, Record, Limit, Order, Status, Chain, PS]

  7. def and(condition: (Table) ⇒ clauses.WhereClause.Condition)(implicit ev: =:=[Chain, Chainned]): QueryType[Table, Record, Limit, Order, Status, Chainned, PS]

    And clauses require overriding for count queries for the same purpose.

    And clauses require overriding for count queries for the same purpose. Without this override, the CQL query executed to fetch the count would still have a "LIMIT 1".

    condition

    The Query condition to execute, based on index operators.

    returns

    A SelectCountWhere.

    Definition Classes
    SelectQueryQuery
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def consistencyLevel_=(level: ConsistencyLevel)(implicit ev: =:=[Status, Unspecified], session: Session): SelectQuery[Table, Record, Limit, Order, Specified, Chain, PS]

    Definition Classes
    SelectQueryQuery
  11. val count: Boolean

    Attributes
    protected[com.websudos.phantom]
  12. def create[T <: CassandraTable[T, _], R, L <: LimitBound, O <: OrderBound, S <: ConsistencyBound, C <: WhereBound, P <: HList](t: T, q: CQLQuery, r: (Row) ⇒ R, part: UsingPart, opts: QueryOptions): QueryType[T, R, L, O, S, C, P]

    Attributes
    protected[this]
    Definition Classes
    SelectQueryQuery
  13. def directMapper(results: List[Row]): List[Record]

    Attributes
    protected[this]
    Definition Classes
    RootExecutableQuery
  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  16. def fetch(modifyStatement: (Statement) ⇒ Statement)(implicit session: Session, keySpace: KeySpace, ec: ExecutionContextExecutor): Future[List[Record]]

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    session

    The implicit session provided by a com.websudos.phantom.connectors.Connector.

    keySpace

    The implicit keySpace definition provided by a com.websudos.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

    Definition Classes
    ExecutableQuery
  17. def fetch(state: PagingState)(implicit session: Session, keySpace: KeySpace, ec: ExecutionContextExecutor): Future[List[Record]]

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    session

    The implicit session provided by a com.websudos.phantom.connectors.Connector.

    keySpace

    The implicit keySpace definition provided by a com.websudos.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

    Definition Classes
    ExecutableQuery
  18. def fetch()(implicit session: Session, keySpace: KeySpace, ec: ExecutionContextExecutor): Future[List[Record]]

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    session

    The implicit session provided by a com.websudos.phantom.connectors.Connector.

    keySpace

    The implicit keySpace definition provided by a com.websudos.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

    Definition Classes
    ExecutableQuery
  19. def fetchRecord(modifyStatement: (Statement) ⇒ Statement)(implicit session: Session, keySpace: KeySpace, ec: ExecutionContextExecutor): Future[ListResult[Record]]

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    session

    The implicit session provided by a com.websudos.phantom.connectors.Connector.

    keySpace

    The implicit keySpace definition provided by a com.websudos.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

    Definition Classes
    ExecutableQuery
  20. def fetchRecord(state: Option[PagingState])(implicit session: Session, keySpace: KeySpace, ec: ExecutionContextExecutor): Future[ListResult[Record]]

    Definition Classes
    ExecutableQuery
  21. def fetchRecord(state: PagingState)(implicit session: Session, keySpace: KeySpace, ec: ExecutionContextExecutor): Future[ListResult[Record]]

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    session

    The implicit session provided by a com.websudos.phantom.connectors.Connector.

    keySpace

    The implicit keySpace definition provided by a com.websudos.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

    Definition Classes
    ExecutableQuery
  22. def fetchRecord()(implicit session: Session, keySpace: KeySpace, ec: ExecutionContextExecutor): Future[ListResult[Record]]

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    Returns a parsed sequence of [R]ows This is not suitable for big results set

    session

    The implicit session provided by a com.websudos.phantom.connectors.Connector.

    keySpace

    The implicit keySpace definition provided by a com.websudos.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

    Definition Classes
    ExecutableQuery
  23. val filteringPart: FilteringPart

    Attributes
    protected[com.websudos.phantom]
  24. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def fromRow(row: Row): Record

    Definition Classes
    SelectQueryExecutableQuery → RootExecutableQuery
  26. def future(modifyStatement: (Statement) ⇒ Statement)(implicit session: Session, keySpace: KeySpace, executor: ExecutionContextExecutor): Future[ResultSet]

    This will convert the underlying call to Cassandra done with Google Guava ListenableFuture to a consumable Scala Future that will be completed once the operation is completed on the database end.

    This will convert the underlying call to Cassandra done with Google Guava ListenableFuture to a consumable Scala Future that will be completed once the operation is completed on the database end.

    The execution context of the transformation is provided by phantom via com.websudos.phantom.Manager.scalaExecutor and it is recommended to use com.websudos.phantom.dsl.context for operations that chain database calls.

    modifyStatement

    The function allowing to modify underlying Statement

    session

    The implicit session provided by a com.websudos.phantom.connectors.Connector.

    keySpace

    The implicit keySpace definition provided by a com.websudos.phantom.connectors.Connector.

    executor

    The implicit Scala executor.

    returns

    An asynchronous Scala future wrapping the Datastax result set.

    Definition Classes
    ExecutableStatement
  27. def future()(implicit session: Session, keySpace: KeySpace, ec: ExecutionContextExecutor): Future[ResultSet]

    Default asynchronous query execution method.

    Default asynchronous query execution method. This will convert the underlying call to Cassandra done with Google Guava ListenableFuture to a consumable Scala Future that will be completed once the operation is completed on the database end.

    The execution context of the transformation is provided by phantom via com.websudos.phantom.Manager.scalaExecutor and it is recommended to use com.websudos.phantom.dsl.context for operations that chain database calls.

    session

    The implicit session provided by a com.websudos.phantom.connectors.Connector.

    keySpace

    The implicit keySpace definition provided by a com.websudos.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    An asynchronous Scala future wrapping the Datastax result set.

    Definition Classes
    ExecutableStatement
  28. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  29. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  30. val init: CQLQuery

  31. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  32. def iterator()(implicit session: Session, keySpace: KeySpace, ec: ExecutionContextExecutor): Future[Iterator[Record]]

    Returns a parsed iterator of [R]ows

    Returns a parsed iterator of [R]ows

    session

    The implicit session provided by a com.websudos.phantom.connectors.Connector.

    keySpace

    The implicit keySpace definition provided by a com.websudos.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping scala iterator of mapped results.

    Definition Classes
    ExecutableQuery
  33. def iteratorRecord()(implicit session: Session, keySpace: KeySpace, ec: ExecutionContextExecutor): Future[IteratorResult[Record]]

    Definition Classes
    ExecutableQuery
  34. def limit(limit: Int)(implicit ev: =:=[Limit, Unlimited]): QueryType[Table, Record, Limited, Order, Status, Chain, PS]

    Definition Classes
    SelectQueryQuery
    Annotations
    @implicitNotFound( ... )
  35. val limitedPart: LimitedPart

    Attributes
    protected[com.websudos.phantom]
  36. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  39. def one()(implicit session: Session, keySpace: KeySpace, ev: =:=[Limit, Unlimited], ec: ExecutionContextExecutor): Future[Option[Record]]

    Returns the first row from the select ignoring everything else

    Returns the first row from the select ignoring everything else

    session

    The implicit session provided by a com.websudos.phantom.connectors.Connector.

    keySpace

    The implicit keySpace definition provided by a com.websudos.phantom.connectors.Connector.

    ev

    The implicit limit for the query.

    ec

    The implicit Scala execution context.

    returns

    A Scala future guaranteed to contain a single result wrapped as an Option.

    Definition Classes
    SelectQueryExecutableQuery
    Annotations
    @implicitNotFound( ... )
  40. val options: QueryOptions

    Definition Classes
    SelectQueryQueryExecutableStatement
  41. final def orderBy(clauses: (Table) ⇒ Condition*)(implicit ev: =:=[Order, Unordered]): SelectQuery[Table, Record, Limit, Ordered, Status, Chain, PS]

    Annotations
    @implicitNotFound( ... )
  42. val orderPart: OrderPart

    Attributes
    protected[com.websudos.phantom]
  43. def p_and[RR](condition: (Table) ⇒ clauses.PreparedWhereClause.ParametricCondition[RR])(implicit ev: =:=[Chain, Chainned]): SelectQuery[Table, Record, Limit, Order, Status, Chainned, ::[RR, PS]]

    The and operator that adds parametric condition to the where predicates.

    The and operator that adds parametric condition to the where predicates.

    condition

    A where clause condition restricted by path dependant types.

    ev

    An evidence request guaranteeing the user cannot chain multiple where clauses on the same query.

    returns

    Annotations
    @implicitNotFound( ... )
  44. def p_where[RR](condition: (Table) ⇒ clauses.PreparedWhereClause.ParametricCondition[RR])(implicit ev: =:=[Chain, Unchainned]): SelectQuery[Table, Record, Limit, Order, Status, Chainned, ::[RR, PS]]

    The where method of a select query that takes parametric predicate as an argument.

    The where method of a select query that takes parametric predicate as an argument.

    condition

    A where clause condition restricted by path dependant types.

    ev

    An evidence request guaranteeing the user cannot chain multiple where clauses on the same query.

    returns

    Annotations
    @implicitNotFound( ... )
  45. def prepare[Rev <: HList]()(implicit session: Session, keySpace: KeySpace, ev: =:!=[PS, HNil], rev: Aux[PS, Rev]): PreparedSelectBlock[Table, Record, Limit, Rev]

  46. val qb: CQLQuery

    Definition Classes
    SelectQueryQueryExecutableStatement
  47. def queryString: String

    Definition Classes
    ExecutableStatement
  48. val rowFunc: (Row) ⇒ Record

    Attributes
    protected[com.websudos.phantom]
  49. def scalaQueryStringExecuteToFuture(st: Statement)(implicit session: Session, keyspace: KeySpace, executor: ExecutionContextExecutor): Future[ResultSet]

    Attributes
    protected[this]
    Definition Classes
    CassandraOperations
  50. def scalaQueryStringToPromise(st: Statement)(implicit session: Session, keyspace: KeySpace, executor: ExecutionContextExecutor): Promise[ResultSet]

    Attributes
    protected[this]
    Definition Classes
    CassandraOperations
  51. def singleResult(row: Row): Option[Record]

    Attributes
    protected[this]
    Definition Classes
    RootExecutableQuery
  52. def statement()(implicit session: Session): Statement

    Definition Classes
    ExecutableStatement
  53. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  54. val table: Table

    Attributes
    protected[com.websudos.phantom]
  55. def toString(): String

    Definition Classes
    AnyRef → Any
  56. def ttl(duration: FiniteDuration): QueryType[Table, Record, Limit, Order, Status, Chain, PS]

    Definition Classes
    Query
  57. def ttl(seconds: Long): QueryType[Table, Record, Limit, Order, Status, Chain, PS]

    Definition Classes
    Query
  58. def using(clause: Condition): SelectQuery[Table, Record, Limit, Order, Status, Chainned, PS]

  59. val usingPart: UsingPart

    Attributes
    protected[com.websudos.phantom]
  60. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. def where(condition: (Table) ⇒ clauses.WhereClause.Condition)(implicit ev: =:=[Chain, Unchainned]): QueryType[Table, Record, Limit, Order, Status, Chainned, PS]

    The where method of a select query.

    The where method of a select query.

    condition

    A where clause condition restricted by path dependant types.

    ev

    An evidence request guaranteeing the user cannot chain multiple where clauses on the same query.

    returns

    Definition Classes
    SelectQueryQuery
  64. val wherePart: WherePart

    Attributes
    protected[com.websudos.phantom]

Inherited from ExecutableQuery[Table, Record, Limit]

Inherited from RootExecutableQuery[Record]

Inherited from Query[Table, Record, Limit, Order, Status, Chain, PS]

Inherited from ExecutableStatement

Inherited from CassandraOperations

Inherited from SessionAugmenterImplicits

Inherited from AnyRef

Inherited from Any

Ungrouped