protected Marker(int bindIndex, ColumnSpecification receiver) { super(bindIndex, receiver); assert receiver.type.isUDT(); }
protected Marker(int bindIndex, ColumnSpecification receiver) { super(bindIndex, receiver); assert receiver.type.isUDT(); }
protected Marker(int bindIndex, ColumnSpecification receiver) { super(bindIndex, receiver); assert receiver.type.isUDT(); }
protected Marker(int bindIndex, ColumnSpecification receiver) { super(bindIndex, receiver); assert receiver.type.isUDT(); }
private UDTFieldAccessBound(ColumnCondition condition, QueryOptions options) throws InvalidRequestException { super(condition.column, condition.operator); assert column.type.isUDT() && condition.field != null; assert condition.operator != Operator.IN; this.field = condition.field; this.value = condition.value.bindAndGet(options); }
private UDTFieldAccessBound(ColumnCondition condition, QueryOptions options) throws InvalidRequestException { super(condition.column, condition.operator); assert column.type.isUDT() && condition.field != null; assert condition.operator != Operator.IN; this.field = condition.field; this.value = condition.value.bindAndGet(options); }
private static void resolveUserType(UserType type, Set<AbstractType> typeSet, List<AbstractType> types) { for (AbstractType subType: type.fieldTypes()) if (!typeSet.contains(subType) && subType.isUDT()) resolveUserType((UserType) subType, typeSet, types); if (!typeSet.contains(type)) { typeSet.add(type); types.add(type); } }
private static void resolveUserType(UserType type, Set<AbstractType> typeSet, List<AbstractType> types) { for (AbstractType subType: type.fieldTypes()) if (!typeSet.contains(subType) && subType.isUDT()) resolveUserType((UserType) subType, typeSet, types); if (!typeSet.contains(type)) { typeSet.add(type); types.add(type); } }
private UDTBound(ColumnCondition condition, QueryOptions options) throws InvalidRequestException { super(condition.column, condition.operator); assert column.type.isUDT() && condition.field == null; assert condition.operator != Operator.IN; protocolVersion = options.getProtocolVersion(); value = condition.value.bindAndGet(options); }
private UDTBound(ColumnCondition condition, QueryOptions options) throws InvalidRequestException { super(condition.column, condition.operator); assert column.type.isUDT() && condition.field == null; assert condition.operator != Operator.IN; protocolVersion = options.getProtocolVersion(); value = condition.value.bindAndGet(options); }
private UDTBound(ColumnCondition condition, QueryOptions options) throws InvalidRequestException { super(condition.column, condition.operator); assert column.type.isUDT() && condition.field == null; assert condition.operator != Operator.IN; protocolVersion = options.getProtocolVersion(); value = condition.value.bindAndGet(options); }
public Operation prepare(String keyspace, ColumnDefinition receiver, CFMetaData cfm) throws InvalidRequestException { if (!receiver.type.isUDT()) throw new InvalidRequestException(String.format("Invalid field deletion operation for non-UDT column %s", receiver.name)); else if (!receiver.type.isMultiCell()) throw new InvalidRequestException(String.format("Frozen UDT column %s does not support field deletions", receiver.name)); if (((UserType) receiver.type).fieldPosition(field) == -1) throw new InvalidRequestException(String.format("UDT column %s does not have a field named %s", receiver.name, field)); return new UserTypes.DeleterByField(receiver, field); } }
public Operation prepare(String keyspace, ColumnDefinition receiver, CFMetaData cfm) throws InvalidRequestException { if (!receiver.type.isUDT()) throw new InvalidRequestException(String.format("Invalid field deletion operation for non-UDT column %s", receiver.name)); else if (!receiver.type.isMultiCell()) throw new InvalidRequestException(String.format("Frozen UDT column %s does not support field deletions", receiver.name)); if (((UserType) receiver.type).fieldPosition(field) == -1) throw new InvalidRequestException(String.format("UDT column %s does not have a field named %s", receiver.name, field)); return new UserTypes.DeleterByField(receiver, field); } }
public Operation prepare(String keyspace, ColumnDefinition receiver, CFMetaData cfm) throws InvalidRequestException { if (!receiver.type.isUDT()) throw new InvalidRequestException(String.format("Invalid field deletion operation for non-UDT column %s", receiver.name)); else if (!receiver.type.isMultiCell()) throw new InvalidRequestException(String.format("Frozen UDT column %s does not support field deletions", receiver.name)); if (((UserType) receiver.type).fieldPosition(field) == -1) throw new InvalidRequestException(String.format("UDT column %s does not have a field named %s", receiver.name, field)); return new UserTypes.DeleterByField(receiver, field); } }
public Operation prepare(CFMetaData cfm, ColumnDefinition receiver) throws InvalidRequestException { if (!receiver.type.isUDT()) throw new InvalidRequestException(String.format("Invalid operation (%s) for non-UDT column %s", toString(receiver), receiver.name)); else if (!receiver.type.isMultiCell()) throw new InvalidRequestException(String.format("Invalid operation (%s) for frozen UDT column %s", toString(receiver), receiver.name)); int fieldPosition = ((UserType) receiver.type).fieldPosition(field); if (fieldPosition == -1) throw new InvalidRequestException(String.format("UDT column %s does not have a field named %s", receiver.name, field)); Term val = value.prepare(cfm.ksName, UserTypes.fieldSpecOf(receiver, fieldPosition)); return new UserTypes.SetterByField(receiver, field, val); }
public Operation prepare(CFMetaData cfm, ColumnDefinition receiver) throws InvalidRequestException { if (!receiver.type.isUDT()) throw new InvalidRequestException(String.format("Invalid operation (%s) for non-UDT column %s", toString(receiver), receiver.name)); else if (!receiver.type.isMultiCell()) throw new InvalidRequestException(String.format("Invalid operation (%s) for frozen UDT column %s", toString(receiver), receiver.name)); int fieldPosition = ((UserType) receiver.type).fieldPosition(field); if (fieldPosition == -1) throw new InvalidRequestException(String.format("UDT column %s does not have a field named %s", receiver.name, field)); Term val = value.prepare(cfm.ksName, UserTypes.fieldSpecOf(receiver, fieldPosition)); return new UserTypes.SetterByField(receiver, field, val); }
public Operation prepare(CFMetaData cfm, ColumnDefinition receiver) throws InvalidRequestException { if (!receiver.type.isUDT()) throw new InvalidRequestException(String.format("Invalid operation (%s) for non-UDT column %s", toString(receiver), receiver.name)); else if (!receiver.type.isMultiCell()) throw new InvalidRequestException(String.format("Invalid operation (%s) for frozen UDT column %s", toString(receiver), receiver.name)); int fieldPosition = ((UserType) receiver.type).fieldPosition(field); if (fieldPosition == -1) throw new InvalidRequestException(String.format("UDT column %s does not have a field named %s", receiver.name, field)); Term val = value.prepare(cfm.ksName, UserTypes.fieldSpecOf(receiver, fieldPosition)); return new UserTypes.SetterByField(receiver, field, val); }
private void validateOperationOnDurations(AbstractType<?> type) { if (type.referencesDuration() && operator.isSlice()) { checkFalse(type.isCollection(), "Slice conditions are not supported on collections containing durations"); checkFalse(type.isTuple(), "Slice conditions are not supported on tuples containing durations"); checkFalse(type.isUDT(), "Slice conditions are not supported on UDTs containing durations"); throw invalidRequest("Slice conditions are not supported on durations", operator); } } }
private void validateOperationOnDurations(AbstractType<?> type) { if (type.referencesDuration() && operator.isSlice()) { checkFalse(type.isCollection(), "Slice conditions are not supported on collections containing durations"); checkFalse(type.isTuple(), "Slice conditions are not supported on tuples containing durations"); checkFalse(type.isUDT(), "Slice conditions are not supported on UDTs containing durations"); throw invalidRequest("Slice conditions are not supported on durations", operator); } } }
private void validateOperationOnDurations(AbstractType<?> type) { if (type.referencesDuration() && operator.isSlice()) { checkFalse(type.isCollection(), "Slice conditions are not supported on collections containing durations"); checkFalse(type.isTuple(), "Slice conditions are not supported on tuples containing durations"); checkFalse(type.isUDT(), "Slice conditions are not supported on UDTs containing durations"); throw invalidRequest("Slice conditions are not supported on durations", operator); } } }