/** * Advanced "set" assignment of a value to a column or a * {@link com.datastax.driver.core.UserType UDT} field. * <p/> * This method is seldom preferable to {@link #set(String, Object)}; it is only useful: * <ul> * <li>when assigning values to individual fields of a UDT (see {@link #path(String...)}): * <pre> * set(path("udt", "field"), value) * </pre> * </li> * <li>if you wish to pass a "raw" string that will get appended as-is to the query (see {@link #raw(String)}). * There is no practical usage for this the time of writing, but it will serve as a workaround if new features are * added to Cassandra and you're using a older driver version that is not yet aware of them: * <pre> * set(raw("some custom string"), value) * </pre> * </li> * </ul> * If the runtime type of {@code name} is {@code String}, this method is equivalent to {@link #set(String, Object)}. * * @param name the column or UDT field name * @param value the value to assign * @return the correspond assignment (to use in an update query) */ public static Assignment set(Object name, Object value) { return new Assignment.SetAssignment(name, value); }
/** * Simple "set" assignment of a value to a column. * <p/> * This will generate: * <pre> * name = value * </pre> * The column name will only be quoted if it contains special characters, as in: * <pre> * "a name that contains spaces" = value * </pre> * Otherwise, if you want to force case sensitivity, use * {@link #quote(String)}: * <pre> * set(quote("aCaseSensitiveName"), value) * </pre> * This method won't work to set UDT fields; use {@link #set(Object, Object)} with a * {@link #path(String...) path} instead: * <pre> * set(path("udt", "field"), value) * </pre> * * @param name the column name * @param value the value to assign * @return the correspond assignment (to use in an update query) */ public static Assignment set(String name, Object value) { return new Assignment.SetAssignment(name, value); }
/** * Simple "set" assignment of a value to a column. * <p/> * This will generate: {@code name = value}. * * @param name the column name * @param value the value to assign * @return the correspond assignment (to use in an update query) */ public static Assignment set(String name, Object value) { return new Assignment.SetAssignment(name, value); }
/** * Simple "set" assignment of a value to a column. * <p/> * This will generate: {@code name = value}. * * @param name the column name * @param value the value to assign * @return the correspond assignment (to use in an update query) */ public static Assignment set(String name, Object value) { return new Assignment.SetAssignment(name, value); }
/** * Simple "set" assignment of a value to a column. * <p> * This will generate: {@code name = value}. * * @param name the column name * @param value the value to assign * @return the correspond assignment (to use in an update query) */ public static Assignment set(String name, Object value) { return new Assignment.SetAssignment(name, value); }
return new Assignment.SetAssignment(name, value);
/** * Advanced "set" assignment of a value to a column or a {@link com.datastax.driver.core.UserType * UDT} field. * * <p>This method is seldom preferable to {@link #set(String, Object)}; it is only useful: * * <ul> * <li>when assigning values to individual fields of a UDT (see {@link #path(String...)}): * <pre> * set(path("udt", "field"), value) * </pre> * <li>if you wish to pass a "raw" string that will get appended as-is to the query (see {@link * #raw(String)}). There is no practical usage for this the time of writing, but it will * serve as a workaround if new features are added to Cassandra and you're using a older * driver version that is not yet aware of them: * <pre> * set(raw("some custom string"), value) * </pre> * </ul> * * If the runtime type of {@code name} is {@code String}, this method is equivalent to {@link * #set(String, Object)}. * * @param name the column or UDT field name * @param value the value to assign * @return the correspond assignment (to use in an update query) */ public static Assignment set(Object name, Object value) { return new Assignment.SetAssignment(name, value); }