@Test public void getSizeForCqlResultWithRows() { assertThat(ThriftObjectSizeUtils.getCqlResultSize( new CqlResult(CqlResultType.ROWS).setRows(ImmutableList.of(new CqlRow())))) .isEqualTo(NULL_SIZE * 5); }
@Test public void passesCqlQueriesAndResultsToAndFromDelegate() throws TException { ByteBuffer byteBuffer = ByteBuffer.allocate(1); CqlResult standardCqlResult = new CqlResult(CqlResultType.ROWS) .setRows(ImmutableList.of(new CqlRow(byteBuffer, ImmutableList.of(new Column(byteBuffer))))); setDelegateResponseToCqlQuery(standardCqlResult); assertThat(executeCqlQuery()).isEqualTo(standardCqlResult); verifyCqlQueryWasExecuted(); }
public CqlRow deepCopy() { return new CqlRow(this); }
public CqlRow deepCopy() { return new CqlRow(this); }
public CqlRow deepCopy() { return new CqlRow(this); }
private static final CqlRow makeRow(String key, List<Column> columnList) { return new CqlRow(bytes(key), columnList); }
/** * Performs a deep copy on <i>other</i>. */ public CqlResult(CqlResult other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetType()) { this.type = other.type; } if (other.isSetRows()) { List<CqlRow> __this__rows = new ArrayList<CqlRow>(other.rows.size()); for (CqlRow other_element : other.rows) { __this__rows.add(new CqlRow(other_element)); } this.rows = __this__rows; } this.num = other.num; if (other.isSetSchema()) { this.schema = new CqlMetadata(other.schema); } }
/** * Performs a deep copy on <i>other</i>. */ public CqlResult(CqlResult other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetType()) { this.type = other.type; } if (other.isSetRows()) { List<CqlRow> __this__rows = new ArrayList<CqlRow>(other.rows.size()); for (CqlRow other_element : other.rows) { __this__rows.add(new CqlRow(other_element)); } this.rows = __this__rows; } this.num = other.num; if (other.isSetSchema()) { this.schema = new CqlMetadata(other.schema); } }
/** * Performs a deep copy on <i>other</i>. */ public CqlResult(CqlResult other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetType()) { this.type = other.type; } if (other.isSetRows()) { List<CqlRow> __this__rows = new ArrayList<CqlRow>(other.rows.size()); for (CqlRow other_element : other.rows) { __this__rows.add(new CqlRow(other_element)); } this.rows = __this__rows; } this.num = other.num; if (other.isSetSchema()) { this.schema = new CqlMetadata(other.schema); } }
cqlRows.add(new CqlRow(ByteBufferUtil.EMPTY_BYTE_BUFFER, thriftCols));
cqlRows.add(new CqlRow(ByteBufferUtil.EMPTY_BYTE_BUFFER, thriftCols));
cqlRows.add(new CqlRow(ByteBufferUtil.EMPTY_BYTE_BUFFER, thriftCols));
_elem194 = new CqlRow(); _elem194.read(iprot); struct.rows.add(_elem194);
_elem194 = new CqlRow(); _elem194.read(iprot); struct.rows.add(_elem194);
_elem194 = new CqlRow(); _elem194.read(iprot); struct.rows.add(_elem194);
_elem199 = new CqlRow(); _elem199.read(iprot); struct.rows.add(_elem199);
_elem199 = new CqlRow(); _elem199.read(iprot); struct.rows.add(_elem199);
_elem199 = new CqlRow(); _elem199.read(iprot); struct.rows.add(_elem199);
"LongType"); List<Column> columns = Collections.singletonList(new Column(countBytes).setValue(ByteBufferUtil.bytes((long) rows.size()))); result.rows = Collections.singletonList(new CqlRow(countBytes, columns)); return result; CqlRow cqlRow = new CqlRow(); cqlRow.key = row.key.getKey(); cqlRow.columns = thriftColumns;