com.outworkers.phantom.builder.query

ExecutableQuery

trait ExecutableQuery[T <: CassandraTable[T, _], R, Limit <: LimitBound] extends ExecutableStatement with RootExecutableQuery[R]

An ExecutableQuery implementation, meant to retrieve results from Cassandra. This provides the root implementation of a Select query.

T

The class owning the table.

R

The record type to store.

Linear Supertypes
RootExecutableQuery[R], ExecutableStatement, CassandraOperations, SessionAugmenterImplicits, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ExecutableQuery
  2. RootExecutableQuery
  3. ExecutableStatement
  4. CassandraOperations
  5. SessionAugmenterImplicits
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type Modifier = (Statement) ⇒ Statement

    Definition Classes
    ExecutableStatement
  2. implicit class RichSession extends SessionAugmenter

    Definition Classes
    SessionAugmenterImplicits

Abstract Value Members

  1. abstract def fromRow(r: Row): R

    Definition Classes
    ExecutableQuery → RootExecutableQuery
  2. abstract def one()(implicit session: Session, ev: =:=[Limit, Unlimited], ec: ExecutionContextExecutor): Future[Option[R]]

    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.outworkers.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.

  3. abstract def options: QueryOptions

    Definition Classes
    ExecutableStatement
  4. abstract def qb: CQLQuery

    Definition Classes
    ExecutableStatement

Concrete 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 directMapper(results: Iterator[Row]): List[R]

    Attributes
    protected[this]
    Definition Classes
    RootExecutableQuery
  9. def directMapper(results: List[Row])(implicit cbf: CanBuildFrom[Nothing, R, List[R]]): List[R]

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

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

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

    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.outworkers.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

  13. def fetch()(implicit session: Session, ec: ExecutionContextExecutor): Future[List[R]]

    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.outworkers.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

  14. def fetchRecord(modifyStatement: (Statement) ⇒ Statement)(implicit session: Session, ec: ExecutionContextExecutor): Future[ListResult[R]]

    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.outworkers.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

  15. def fetchRecord()(implicit session: Session, ec: ExecutionContextExecutor): Future[ListResult[R]]

    Returns a parsed sequence of [R]ows This is not suitable for big results set as it will attempt to fetch the entire result set as a List, circumventing pagination settings.

    Returns a parsed sequence of [R]ows This is not suitable for big results set as it will attempt to fetch the entire result set as a List, circumventing pagination settings.

    Use paginateRecord() or other means if you like to deal with bigger result sets.

    session

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

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

  16. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. def future(modifyStatement: (Statement) ⇒ Statement)(implicit session: Session, 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.outworkers.phantom.Manager.scalaExecutor and it is recommended to use com.outworkers.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.outworkers.phantom.connectors.Connector.

    executor

    The implicit Scala executor.

    returns

    An asynchronous Scala future wrapping the Datastax result set.

    Definition Classes
    ExecutableStatement
  18. def future()(implicit session: Session, 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.outworkers.phantom.Manager.scalaExecutor and it is recommended to use com.outworkers.phantom.dsl.context for operations that chain database calls.

    session

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

    ec

    The implicit Scala execution context.

    returns

    An asynchronous Scala future wrapping the Datastax result set.

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

    Definition Classes
    AnyRef → Any
  20. def greedyEval(f: Future[ResultSet])(implicit ex: ExecutionContextExecutor): Future[ListResult[R]]

    Attributes
    protected[this]
  21. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def iterator(state: Option[PagingState])(implicit session: Session, ec: ExecutionContextExecutor): Future[IteratorResult[R]]

    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.outworkers.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

  24. def iterator(state: PagingState)(implicit session: Session, ec: ExecutionContextExecutor): Future[IteratorResult[R]]

    Returns a parsed sequence of [R]ows.

    Returns a parsed sequence of [R]ows. This will only fetch the amount of records defined in the fetchSize setting. It will allow pagination of the inner result set as a scala.collection.immutable.List.

    It will greedy evaluate the records inside a single fetch size batch as it returns a list as opposed to an iterator. For a non greedy variant of the size method use iterator().

    session

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

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

  25. def iterator(modifier: (Statement) ⇒ Statement)(implicit session: Session, ec: ExecutionContextExecutor): Future[IteratorResult[R]]

    Returns a parsed iterator of [R]ows lazily evaluated.

    Returns a parsed iterator of [R]ows lazily evaluated. This will respect the fetch size setting of a query, meaning you will need to provide a paging state to fetch records beyond the regular fetch size.

    session

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

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping scala iterator of mapped results.

  26. def iterator()(implicit session: Session, ec: ExecutionContextExecutor): Future[IteratorResult[R]]

    Returns a parsed iterator of [R]ows lazily evaluated.

    Returns a parsed iterator of [R]ows lazily evaluated. This will respect the fetch size setting of a query, meaning you will need to provide a paging state to fetch records beyond the regular fetch size.

    session

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

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping scala iterator of mapped results.

  27. def lazyEval(f: Future[ResultSet])(implicit ex: ExecutionContextExecutor): Future[IteratorResult[R]]

    Attributes
    protected[this]
  28. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  31. def paginateRecord(modifier: (Statement) ⇒ Statement)(implicit session: Session, ec: ExecutionContextExecutor, cbf: CanBuildFrom[Nothing, R, List[R]]): Future[ListResult[R]]

    Returns a parsed sequence of [R]ows.

    Returns a parsed sequence of [R]ows. This will only fetch the amount of records defined in the fetchSize setting. It will allow pagination of the inner result set as a scala.collection.immutable.List.

    It will greedy evaluate the records inside a single fetch size batch as it returns a list as opposed to an iterator. For a non greedy variant of the size method use iterator().

    session

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

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

  32. def paginateRecord(state: Option[PagingState])(implicit session: Session, ec: ExecutionContextExecutor, cbf: CanBuildFrom[Nothing, R, List[R]]): Future[ListResult[R]]

    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.outworkers.phantom.connectors.Connector.

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

  33. def paginateRecord(state: PagingState)(implicit session: Session, ec: ExecutionContextExecutor, cbf: CanBuildFrom[Nothing, R, Iterator[R]]): Future[ListResult[R]]

    Returns a parsed sequence of [R]ows.

    Returns a parsed sequence of [R]ows. This will only fetch the amount of records defined in the fetchSize setting. It will allow pagination of the inner result set as a scala.collection.immutable.List.

    It will greedy evaluate the records inside a single fetch size batch as it returns a list as opposed to an iterator. For a non greedy variant of the size method use iterator().

    session

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

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

  34. def paginateRecord()(implicit session: Session, ec: ExecutionContextExecutor, cbf: CanBuildFrom[Nothing, R, List[R]]): Future[ListResult[R]]

    Returns a parsed sequence of [R]ows but paginates the results using paging state.

    Returns a parsed sequence of [R]ows but paginates the results using paging state. This will not consume or return the entire set of available results, it will instead return an amount of records equal to the fetch size setting.

    session

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

    ec

    The implicit Scala execution context.

    returns

    A Scala future wrapping a list of mapped results.

  35. def preparedStatementToPromise(st: String)(implicit session: Session, executor: ExecutionContextExecutor): Promise[PreparedStatement]

    Attributes
    protected[this]
    Definition Classes
    CassandraOperations
  36. def queryString: String

    Definition Classes
    ExecutableStatement
  37. def scalaQueryStringExecuteToFuture(st: Statement)(implicit session: Session, executor: ExecutionContextExecutor): Future[ResultSet]

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

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

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

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

    Definition Classes
    AnyRef
  42. def toString(): String

    Definition Classes
    AnyRef → Any
  43. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from RootExecutableQuery[R]

Inherited from ExecutableStatement

Inherited from CassandraOperations

Inherited from SessionAugmenterImplicits

Inherited from AnyRef

Inherited from Any

Ungrouped