Package org.apache.cassandra.thrift

Examples of org.apache.cassandra.thrift.CqlRow$CqlRowStandardSchemeFactory


     * @return {@link UUID}
     */
    protected UUID getAutoGeneratedValue() {
        CqlResult cqlResult = execute("Select now() from system.schema_columns", getRawClient("system"));

        CqlRow cqlRow = cqlResult.getRowsIterator().next();

        return UUID.nameUUIDFromBytes(cqlRow.getColumns().get(0).getValue());
    }
View Full Code Here


        CqlResult cqlResult = execute(selectQueryBuilder.toString(), getRawClient(schemaName));

        Iterator<CqlRow> rowIter = cqlResult.getRows().iterator();
        while (rowIter.hasNext()) {
            CqlRow row = rowIter.next();

            if (!row.getColumns().isEmpty()) {
                Column column = row.getColumns().get(0);
                Object columnValue = CassandraDataTranslator.decompose(columnJavaType, column.getValue(), true);
                results.add(columnValue);
            }
        }
        return results;
View Full Code Here

              default:
                if ( result.getRowsSize() > 0 ) {
                  LinkedHashMap<ByteBuffer, List<Column>> ret = new LinkedHashMap<ByteBuffer, List<Column>>(result.getRowsSize());
                 
                  for (Iterator<CqlRow> rowsIter = result.getRowsIterator(); rowsIter.hasNext(); ) {
                    CqlRow row = rowsIter.next();
                    ret.put(ByteBuffer.wrap(row.getKey()), row.getColumns());
                  }
                  Map<K, List<Column>> thriftRet = keySerializer.fromBytesMap(ret);
                  rows = new CqlRows<K, N, V>((LinkedHashMap<K, List<Column>>)thriftRet, columnNameSerializer, valueSerializer);
                }
                break;
View Full Code Here

TOP

Related Classes of org.apache.cassandra.thrift.CqlRow$CqlRowStandardSchemeFactory

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.