/** * Generate an UPDATE FROM ... <strong>SET list[index] = null</strong> */ public final EntityWithBeanValidation_Update.Cols RemoveAtIndex(final int index) { where.with(QueryBuilder.setIdx("list", index, QueryBuilder.bindMarker("list"))); boundValues.add(null); encodedValues.add(null); return EntityWithBeanValidation_Update.Cols.this; }
/** * Generate an UPDATE FROM ... <strong>SET collectionIndex[index] = null</strong> */ public final EntityWithIndicesForJSON_Update.Cols RemoveAtIndex(final int index) { where.with(QueryBuilder.setIdx("collectionindex", index, QueryBuilder.bindMarker("collectionindex"))); boundValues.add(null); encodedValues.add(null); return EntityWithIndicesForJSON_Update.Cols.this; }
/** * Generate an UPDATE FROM ... <strong>SET list[index] = null</strong> */ public final EntityWithCaseSensitivePK_Update.Cols RemoveAtIndex(final int index) { where.with(QueryBuilder.setIdx("\"listString\"", index, QueryBuilder.bindMarker("\"listString\""))); boundValues.add(null); encodedValues.add(null); return EntityWithCaseSensitivePK_Update.Cols.this; }
/** * Generate an UPDATE FROM ... <strong>SET listNesting[index] = null</strong> */ public final EntityWithComplexTypes_Update.Cols RemoveAtIndex(final int index) { where.with(QueryBuilder.setIdx("list_nesting", index, QueryBuilder.bindMarker("list_nesting"))); boundValues.add(null); encodedValues.add(null); return EntityWithComplexTypes_Update.Cols.this; }
/** * Generate an UPDATE FROM ... <strong>SET collectionIndex[index] = ?</strong> */ public final EntityWithComplexIndices_Update.Cols SetAtIndex(final int index, final String collectionIndex_element) { where.with(QueryBuilder.setIdx("collectionindex", index, QueryBuilder.bindMarker("collectionindex"))); boundValues.add(collectionIndex_element); encodedValues.add(meta.collectionIndex.valueProperty.encodeFromJava(collectionIndex_element, Optional.of(cassandraOptions))); return EntityWithComplexIndices_Update.Cols.this; }
/** * Generate an UPDATE FROM ... <strong>SET listString[index] = ?</strong> */ public final EntityForJSONCall_Update.Cols SetAtIndex(final int index, final String listString_element) { where.with(QueryBuilder.setIdx("liststring", index, QueryBuilder.bindMarker("liststring"))); boundValues.add(listString_element); encodedValues.add(meta.listString.valueProperty.encodeFromJava(listString_element, Optional.of(cassandraOptions))); return EntityForJSONCall_Update.Cols.this; }
/** * Generate an UPDATE FROM ... <strong>SET listUDT[index] = ?</strong> */ public final EntityWithUDTs_Update.Cols SetAtIndex(final int index, final SimpleUDTWithNoKeyspace listUDT_element) { where.with(QueryBuilder.setIdx("listudt", index, QueryBuilder.bindMarker("listudt"))); boundValues.add(listUDT_element); encodedValues.add(meta.listUDT.valueProperty.encodeFromJava(listUDT_element, Optional.of(cassandraOptions))); return EntityWithUDTs_Update.Cols.this; }
/** * Generate an UPDATE FROM ... <strong>SET udtList[index] = null</strong> */ public final EntityWithUDTForDynamicKeyspace_Update.Cols RemoveAtIndex(final int index) { where.with(QueryBuilder.setIdx("udtlist", index, QueryBuilder.bindMarker("udtlist"))); boundValues.add(null); encodedValues.add(null); return new EntityWithUDTForDynamicKeyspace_Update.Cols(where, cassandraOptions); }
/** * Generate an UPDATE FROM ... <strong>SET listString[index] = null</strong> */ public final EntityForJSONCall_Update.Cols RemoveAtIndex(final int index) { where.with(QueryBuilder.setIdx("liststring", index, QueryBuilder.bindMarker("liststring"))); boundValues.add(null); encodedValues.add(null); return new EntityForJSONCall_Update.Cols(where, cassandraOptions); }
/** * Generate an UPDATE FROM ... <strong>SET listOfLongArray[index] = null</strong> */ public final EntityWithComplexTypes_Update.Cols RemoveAtIndex(final int index) { where.with(QueryBuilder.setIdx("listoflongarray", index, QueryBuilder.bindMarker("listoflongarray"))); boundValues.add(null); encodedValues.add(null); return new EntityWithComplexTypes_Update.Cols(where, cassandraOptions); }
@Override public UpdateBuilder<T> addIndexList(String name, int index, Object value) { update.with(QueryBuilder.setIdx(classBean.toColumn(name), index, value)); return this; } @Override
update = update("foo") .with(setIdx("a", 2, "foo")) .and(prependAll("b", Arrays.asList(3, 2, 1))) .and(remove("c", "a"))
.add( update("foo") .with(setIdx("a", 2, "foo")) .and(prependAll("b", Arrays.asList(3, 2, 1))) .and(remove("c", "a"))
/** * Generate an UPDATE FROM ... <strong>SET collectionIndex[index] = null</strong> */ public final EntityWithComplexIndices_Update.Cols RemoveAtIndex(final int index) { where.with(QueryBuilder.setIdx("collectionindex", index, QueryBuilder.bindMarker("collectionindex"))); boundValues.add(null); encodedValues.add(null); return new EntityWithComplexIndices_Update.Cols(where, cassandraOptions); }
/** * Generate an UPDATE FROM ... <strong>SET listUdt[index] = null</strong> */ public final EntityWithComplexTypes_Update.Cols RemoveAtIndex(final int index) { where.with(QueryBuilder.setIdx("list_udt", index, QueryBuilder.bindMarker("list_udt"))); boundValues.add(null); encodedValues.add(null); return new EntityWithComplexTypes_Update.Cols(where, cassandraOptions); }
/** * Generate an UPDATE FROM ... <strong>SET collectionIndex[index] = ?</strong> */ public final EntityWithComplexIndices_Update.Cols SetAtIndex(final int index, final String collectionIndex_element) { where.with(QueryBuilder.setIdx("collectionindex", index, QueryBuilder.bindMarker("collectionindex"))); boundValues.add(collectionIndex_element); encodedValues.add(meta.collectionIndex.valueProperty.encodeFromJava(collectionIndex_element, Optional.of(cassandraOptions))); return new EntityWithComplexIndices_Update.Cols(where, cassandraOptions); }
/** * Generate an UPDATE FROM ... <strong>SET longList[index] = ?</strong> */ public final EntityWithNativeCollections_Update.Cols SetAtIndex(final int index, final Long longList_element) { where.with(QueryBuilder.setIdx("longlist", index, QueryBuilder.bindMarker("longlist"))); boundValues.add(longList_element); encodedValues.add(meta.longList.valueProperty.encodeFromJava(longList_element, Optional.of(cassandraOptions))); return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions); }
/** * Generate an UPDATE FROM ... <strong>SET doubleList[index] = ?</strong> */ public final EntityWithNativeCollections_Update.Cols SetAtIndex(final int index, final Double doubleList_element) { where.with(QueryBuilder.setIdx("doublelist", index, QueryBuilder.bindMarker("doublelist"))); boundValues.add(doubleList_element); encodedValues.add(meta.doubleList.valueProperty.encodeFromJava(doubleList_element, Optional.of(cassandraOptions))); return new EntityWithNativeCollections_Update.Cols(where, cassandraOptions); }
/** * Generate an UPDATE FROM ... <strong>SET consistencyList[index] = ?</strong> */ public final SimpleEntity_Update.Cols SetAtIndex(final int index, final ConsistencyLevel consistencyList_element) { where.with(QueryBuilder.setIdx("consistencylist", index, QueryBuilder.bindMarker("consistencylist"))); boundValues.add(consistencyList_element); encodedValues.add(meta.consistencyList.valueProperty.encodeFromJava(consistencyList_element, Optional.of(cassandraOptions))); return new SimpleEntity_Update.Cols(where, cassandraOptions); }
private static Assignment getAssignment(SetOp updateOp) { if (updateOp instanceof SetAtIndexOp) { SetAtIndexOp op = (SetAtIndexOp) updateOp; return QueryBuilder.setIdx(op.getColumnName().toCql(), op.getIndex(), op.getValue()); } if (updateOp instanceof SetAtKeyOp) { SetAtKeyOp op = (SetAtKeyOp) updateOp; return QueryBuilder.put(op.getColumnName().toCql(), op.getKey(), op.getValue()); } return QueryBuilder.set(updateOp.getColumnName().toCql(), updateOp.getValue()); }