public boolean apply(ColumnDefinition def) { return def.isStatic(); } };
public boolean apply(ColumnDefinition def) { return def.isStatic(); } };
public void addOperation(Operation op) { if (op.column.isStatic()) setsStaticColumns = true; else setsRegularColumns = true; columnOperations.add(op); }
/** * Adds the specified <code>Operation</code> to this set of operations. * @param operation the operation to add */ public void add(Operation operation) { if (operation.column.isStatic()) staticOperations.add(operation); else regularOperations.add(operation); }
/** * Adds the specified <code>Operation</code> to this set of operations. * @param operation the operation to add */ public void add(Operation operation) { if (operation.column.isStatic()) staticOperations.add(operation); else regularOperations.add(operation); }
private boolean isStaticColumn() { return index.getIndexedColumn().isStatic(); }
@Override public CellName create(Composite prefix, ColumnDefinition column, ByteBuffer collectionElement) { if (column.isStatic()) prefix = staticPrefix(); assert prefix.size() == clusteringSize; if (prefix.isEmpty()) return new CompoundSparseCellName.WithCollection(column.name, collectionElement, column.isStatic()); assert prefix instanceof CompoundComposite; CompoundComposite lc = (CompoundComposite)prefix; return new CompoundSparseCellName.WithCollection(lc.elements, clusteringSize, column.name, collectionElement, column.isStatic()); }
private static String toCQL(ColumnDefinition cd, boolean isStaticCompactTable) { return String.format("%s %s%s", quoteIdentifier(cd.name.toString()), cd.type.asCQL3Type().toString(), cd.isStatic() && !isStaticCompactTable ? " static" : ""); }
private static String toCQL(ColumnDefinition cd, boolean isStaticCompactTable) { return String.format("%s %s%s", quoteIdentifier(cd.name.toString()), cd.type.asCQL3Type().toString(), cd.isStatic() && !isStaticCompactTable ? " static" : ""); }
private static String toCQLAdd(String keyspace, String cf, ColumnDefinition cd) { return String.format("ALTER TABLE %s.%s ADD %s %s%s;", quoteIdentifier(keyspace), quoteIdentifier(cf), quoteIdentifier(cd.name.toString()), cd.type.asCQL3Type().toString(), cd.isStatic() ? " static" : ""); }
private static String toCQLAdd(String keyspace, String cf, ColumnDefinition cd) { return String.format("ALTER TABLE %s.%s ADD %s %s%s;", quoteIdentifier(keyspace), quoteIdentifier(cf), quoteIdentifier(cd.name.toString()), cd.type.asCQL3Type().toString(), cd.isStatic() ? " static" : ""); }
private ColumnDefinition getColumn(String columnName) { ColumnDefinition column = metadata.getColumnDefinition(new ColumnIdentifier(columnName, true)); assert column != null : "Cannot find column " + columnName; assert !column.isPrimaryKeyColumn(); assert !column.isStatic() || builder.clustering() == Clustering.STATIC_CLUSTERING : "Cannot add non-static column to static-row"; return column; }
private ColumnDefinition getColumn(String columnName) { ColumnDefinition column = metadata.getColumnDefinition(new ColumnIdentifier(columnName, true)); assert column != null : "Cannot find column " + columnName; assert !column.isPrimaryKeyColumn(); assert !column.isStatic() || builder.clustering() == Clustering.STATIC_CLUSTERING : "Cannot add non-static column to static-row"; return column; }
public void addCell(Cell cell) { assert cell.column().isStatic() == (clustering == Clustering.STATIC_CLUSTERING) : "Column is " + cell.column() + ", clustering = " + clustering; // In practice, only unsorted builder have to deal with shadowed cells, but it doesn't cost us much to deal with it unconditionally in this case if (deletion.deletes(cell)) return; getCells().add(cell); hasComplex |= cell.column.isComplex(); }
public void addCell(Cell cell) { assert cell.column().isStatic() == (clustering == Clustering.STATIC_CLUSTERING) : "Column is " + cell.column() + ", clustering = " + clustering; // In practice, only unsorted builder have to deal with shadowed cells, but it doesn't cost us much to deal with it unconditionally in this case if (deletion.deletes(cell)) return; getCells().add(cell); hasComplex |= cell.column.isComplex(); }
public void addCell(Cell cell) { assert cell.column().isStatic() == (clustering == Clustering.STATIC_CLUSTERING) : "Column is " + cell.column() + ", clustering = " + clustering; // In practice, only unsorted builder have to deal with shadowed cells, but it doesn't cost us much to deal with it unconditionally in this case if (deletion.deletes(cell)) return; getCells().add(cell); hasComplex |= cell.column.isComplex(); }