public void setBound(Restriction.Slice slice) throws InvalidRequestException { for (Bound bound : Bound.values()) if (slice.hasBound(bound)) setBound(bound, slice.isInclusive(bound), slice.bound(bound)); }
public ParsedStatement.Prepared prepare() throws InvalidRequestException { VariableSpecifications boundNames = getBoundVariables(); ModificationStatement statement = prepare(boundNames); return new ParsedStatement.Prepared(statement, boundNames); }
private static Selector makeSelector(CFMetaData cfm, RawSelector raw, List<ColumnDefinition> defs, SelectionColumnMapping columnMapping) throws InvalidRequestException { Selectable selectable = raw.selectable.prepare(cfm); return makeSelector(cfm, selectable, raw.alias, defs, columnMapping); }
public void addExist(Clustering clustering) throws InvalidRequestException { addExistsCondition(clustering, new ExistCondition(clustering), false); }
public void addNotExist(Clustering clustering) throws InvalidRequestException { addExistsCondition(clustering, new NotExistCondition(clustering), true); }
@Override public final void addRowFilterTo(RowFilter filter, SecondaryIndexManager indexManager, QueryOptions options) { throw invalidRequest("Multi-column slice restrictions cannot be used for filtering."); }
private static ResultSet.ResultMetadata extractResultMetadata(CQLStatement statement) { if (!(statement instanceof SelectStatement)) return ResultSet.ResultMetadata.EMPTY; return ((SelectStatement)statement).getResultMetadata(); }
/** * Checks that the modification only apply to static columns. * @return <code>true</code> if the modification only apply to static columns, <code>false</code> otherwise. */ private boolean appliesOnlyToStaticColumns() { return appliesOnlyToStaticColumns(operations, conditions); }
@Override public Prepared prepare(ClientState clientState) { return new Prepared(this); }
/** * Returns the index operator corresponding to the specified boundary. * * @param b the boundary type * @return the index operator corresponding to the specified boundary */ public Operator getIndexOperator(Bound b) { if (b.isStart()) return boundInclusive[b.idx] ? Operator.GTE : Operator.GT; return boundInclusive[b.idx] ? Operator.LTE : Operator.LT; }
public String columnFamily() { CFMetaData cfm = lookupIndexedTable(); return cfm == null ? null : cfm.cfName; }
public void addKeyValue(ColumnDefinition def, Term value) throws InvalidRequestException { addKeyValues(def, new SingleColumnRestriction.EQ(value, false)); }
public void addExist(Clustering clustering) throws InvalidRequestException { addExistsCondition(clustering, new ExistCondition(clustering), false); }
public void addNotExist(Clustering clustering) throws InvalidRequestException { addExistsCondition(clustering, new NotExistCondition(clustering), true); }
@Override public SingleRestriction doMergeWith(SingleRestriction otherRestriction) { throw invalidRequest("%s cannot be restricted by more than one relation if it includes an Equal", columnDef.name); }
public void addExist(Clustering clustering) throws InvalidRequestException { addExistsCondition(clustering, new ExistCondition(clustering), false); }
public void addNotExist(Clustering clustering) throws InvalidRequestException { addExistsCondition(clustering, new NotExistCondition(clustering), true); }
@Override public SingleRestriction doMergeWith(SingleRestriction otherRestriction) { throw invalidRequest("%s cannot be restricted by more than one relation if it includes a %s", columnDef.name, operator); }