Package com.datastax.driver.core

Examples of com.datastax.driver.core.ResultSet


            this.resultSetFuture = resultSetFuture;
        }

        @Override
        public void run() {
            ResultSet result;
            try {
                result = resultSetFuture.get();
                callBack.result(result.all().get(0).getLong(0));
            } catch (InterruptedException | ExecutionException exception) {
                throw new AsyncExecption(exception);
            }
        }
View Full Code Here


        @Override
        public void run() {
            try {

                for (ResultSetFuture resultFutre : results) {
                    ResultSet result = resultFutre.get();
                    @SuppressWarnings("unchecked")
                    List<T> beans = (List<T>) RecoveryObject.INTANCE
                            .recoverObjet(beanClass, result);
                    if (!beans.isEmpty()) {
                        beanList.add(beans.get(0));
View Full Code Here

                    .where(QueryBuilder.eq(byKeyBean.getSearchField().getName(),
                            indexStart));
        }

        // Execute
        ResultSet resultSet = session.execute(byKeyBean.getSelect());
        return RecoveryObject.INTANCE.recoverObjet(bean, resultSet);
    }
View Full Code Here

        statement = new BatchStatement(BatchStatement.Type.UNLOGGED).addAll(mStatements);
      } else {
        statement = mStatements.get(0);
      }

      ResultSet result = mTable.getAdmin().execute(statement);
      LOG.debug("Results from batch commit: {}.", result);

      reset();
    }
  }
View Full Code Here

     */
    public boolean verifyColumnFamily(Session session, String keySpace, String familyColumn,
            Class<?> class1) {
        try {
            Select select = QueryBuilder.select().from(keySpace, familyColumn).limit(1);
            ResultSet resultSet = session.execute(select);
            verifyRowType(resultSet, class1, session);
            findIndex(class1, session);
            return true;
        } catch (InvalidQueryException exception) {

View Full Code Here

        private Map<String, ByteBuffer> previousRowKey = new HashMap<String, ByteBuffer>(); // previous CF row key

        public RowIterator()
        {
            AbstractType type = partitioner.getTokenValidator();
            ResultSet rs = session.execute(cqlQuery, type.compose(type.fromString(split.getStartToken())), type.compose(type.fromString(split.getEndToken())) );
            for (ColumnMetadata meta : cluster.getMetadata().getKeyspace(quote(keyspace)).getTable(quote(cfName)).getPartitionKey())
                partitionBoundColumns.put(meta.getName(), Boolean.TRUE);
            rows = rs.iterator();
        }
View Full Code Here

            this.client = client;
        }

        public boolean run() throws Exception
        {
            ResultSet rs = client.getSession().execute(bindRandom(partitions.get(0)));
            validate(rs);
            rowCount = rs.all().size();
            partitionCount = Math.min(1, rowCount);
            return true;
        }
View Full Code Here

        {
            if (session == null)
                throw new RuntimeException("Can't create connection session");

            AbstractType type = partitioner.getTokenValidator();
            ResultSet rs = session.execute(cqlQuery, type.compose(type.fromString(split.getStartToken())), type.compose(type.fromString(split.getEndToken())) );
            for (ColumnMetadata meta : cluster.getMetadata().getKeyspace(keyspace).getTable(cfName).getPartitionKey())
                partitionBoundColumns.put(meta.getName(), Boolean.TRUE);
            rows = rs.iterator();
        }
View Full Code Here

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Lazy load of {} attributes for {}", attrs.length, type);
        }

        ResultSet resultSet = session.execute(bStmt);
        Row row = resultSet.one();
        if (row != null) {
            Retriever retriever = new GettableRetriever(persistenceSession.persistenceManager.protocolVersion, row, loadColumns);
            for (MappedAttribute attr : attrs) {
                Object instance = resolveParentInstance(container, attr);
                if (LOGGER.isDebugEnabled()) {
View Full Code Here

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Lazy load of {} attributes for {}", attrs.length, type);
        }

        ResultSet resultSet = session.execute(bStmt);
        Row row = resultSet.one();
        if (row != null) {
            Retriever retriever = new GettableRetriever(persistenceSession.persistenceManager.protocolVersion, row, loadColumns);
            for (MappedAttribute attr : attrs) {
                Object instance = resolveParentInstance(container, attr);
                if (LOGGER.isDebugEnabled()) {
View Full Code Here

TOP

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

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.