Package com.datastax.driver.core

Examples of com.datastax.driver.core.SimpleStatement


     * @param mapper result set mapper
     * @param session Cassandra session
     * @param pageSize page size
     */
    public SimplePagedResult(String query, ResultSetMapper<T> mapper, StorageSession session, int pageSize) {
        this(new SimpleStatement(query), mapper, session, pageSize);
    }
View Full Code Here


     * @param mapper result set mapper
     * @param session Cassandra session
     * @param pageSize page size
     */
    public SimplePagedResult(String query, ResultSetMapper<T> mapper, StorageSession session) {
        this(new SimpleStatement(query), mapper, session);
    }
View Full Code Here

  public <T> T queryAsynchronously(final String cql, final ResultSetExtractor<T> rse, final Long timeout,
      final TimeUnit timeUnit, final QueryOptions options) {
    return rse.extractData(execute(new SessionCallback<ResultSet>() {
      @Override
      public ResultSet doInSession(Session s) throws DataAccessException {
        Statement statement = new SimpleStatement(cql);
        addQueryOptions(statement, options);
        ResultSetFuture rsf = s.executeAsync(statement);
        ResultSet rs = null;
        try {
          rs = rsf.get(timeout, timeUnit);
View Full Code Here

  @Override
  public ResultSetFuture queryAsynchronously(final String cql, final QueryOptions options) {
    return execute(new SessionCallback<ResultSetFuture>() {
      @Override
      public ResultSetFuture doInSession(Session s) throws DataAccessException {
        Statement statement = new SimpleStatement(cql);
        addQueryOptions(statement, options);
        return s.executeAsync(statement);
      }
    });
  }
View Full Code Here

  public Cancellable queryAsynchronously(final String cql, final Runnable listener, final QueryOptions options,
      final Executor executor) {
    return execute(new SessionCallback<Cancellable>() {
      @Override
      public Cancellable doInSession(Session s) throws DataAccessException {
        Statement statement = new SimpleStatement(cql);
        addQueryOptions(statement, options);
        ResultSetFuture rsf = s.executeAsync(statement);
        rsf.addListener(listener, executor);
        return new ResultSetFutureCancellable(rsf);
      }
View Full Code Here

  public Cancellable queryAsynchronously(final String cql, final AsynchronousQueryListener listener,
      final QueryOptions options, final Executor executor) {
    return execute(new SessionCallback<Cancellable>() {
      @Override
      public Cancellable doInSession(Session s) throws DataAccessException {
        Statement statement = new SimpleStatement(cql);
        addQueryOptions(statement, options);
        final ResultSetFuture rsf = s.executeAsync(statement);
        Runnable wrapper = new Runnable() {
          @Override
          public void run() {
View Full Code Here

  public <T> T queryAsynchronously(final String cql, ResultSetFutureExtractor<T> rse, final QueryOptions options)
      throws DataAccessException {
    return rse.extractData(execute(new SessionCallback<ResultSetFuture>() {
      @Override
      public ResultSetFuture doInSession(Session s) throws DataAccessException {
        Statement statement = new SimpleStatement(cql);
        addQueryOptions(statement, options);
        return s.executeAsync(statement);
      }
    }));
  }
View Full Code Here

  protected ResultSet doExecute(String cql) {
    return doExecute(cql, null);
  }

  protected ResultSet doExecute(String cql, QueryOptions options) {
    return doExecute(addQueryOptions(new SimpleStatement(cql), options));
  }
View Full Code Here

    return executeAsynchronously(cql, (QueryOptions) null);
  }

  @Override
  public ResultSetFuture executeAsynchronously(final String cql, QueryOptions options) throws DataAccessException {
    return doExecuteAsync(addQueryOptions(new SimpleStatement(cql), options));
  }
View Full Code Here

      throws DataAccessException {

    return execute(new SessionCallback<Cancellable>() {
      @Override
      public Cancellable doInSession(Session s) throws DataAccessException {
        Statement statement = new SimpleStatement(cql);
        final ResultSetFuture rsf = s.executeAsync(statement);
        rsf.addListener(listener, executor);
        return new ResultSetFutureCancellable(rsf);
      }
    });
View Full Code Here

TOP

Related Classes of com.datastax.driver.core.SimpleStatement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.