Package com.datastax.driver.core

Examples of com.datastax.driver.core.SimpleStatement


        //When
        batch.batchNativeStatement(statement,"DuyHai",entity2.getId());
        batch.endBatch();

        //Then
        Statement select = new SimpleStatement("SELECT name from CompleteBean where id=" + entity2.getId());
        Row row = manager.getNativeSession().execute(select).one();
        assertThat(row.getString("name")).isEqualTo("DuyHai");
    }
View Full Code Here


    return new CqlOperationResultImpl<CqlStatementResult>(resultSet, result);
  }

  @Override
  public ListenableFuture<OperationResult<CqlStatementResult>> executeAsync() throws ConnectionException {
    Statement q = new SimpleStatement(cqlQuery);
    q.setConsistencyLevel(ConsistencyLevelTransform.getConsistencyLevel(cLevel));

    ResultSetFuture rsFuture = session.executeAsync(q);

    return new AsyncOperationResult<CqlStatementResult>(rsFuture) {
View Full Code Here

    this.basicCqlQuery = basicCqlQuery;
  }
 
  @Override
  public OperationResult<CqlResult<K, C>> execute() throws ConnectionException {
    return new InternalExecutionImpl(new SimpleStatement(basicCqlQuery)).execute();
  }
View Full Code Here

    return new InternalExecutionImpl(new SimpleStatement(basicCqlQuery)).execute();
  }

  @Override
  public ListenableFuture<OperationResult<CqlResult<K, C>>> executeAsync() throws ConnectionException {
    return new InternalExecutionImpl(new SimpleStatement(basicCqlQuery)).executeAsync();
  }
View Full Code Here

  }

  @Override
  public OperationResult<CqlStatementResult> execute() throws ConnectionException {
   
    Statement q = new SimpleStatement(cqlQuery);
    q.setConsistencyLevel(ConsistencyLevelTransform.getConsistencyLevel(cLevel));
   
    ResultSet resultSet = session.execute(q);
   
    CqlStatementResult result = new DirectCqlStatementResultImpl(resultSet);
    return new CqlOperationResultImpl<CqlStatementResult>(resultSet, result);
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.