|CQL reference / cqlsh commands|
Treats a column name or value as a specified type, even if that type information is not specified in the table's metadata.
ASSUME keyspace_name.table_name storage_type_definition , storage_type_definition ..., ...
(column_name) VALUES ARE datatype | NAMES ARE datatype | VALUES ARE datatype
In the synopsis section of each statement, formatting has the following meaning:
A semicolon that terminates CQL statements is not included in the synopsis.
ASSUME treats all values in the given column in the given table as being of the specified type when the storage_type_definition is:
(column_name) VALUES ARE datatype
This overrides any other information about the type of a value.
ASSUME treats all column names in the given table as being of the given type when the storage_type_definition is:
NAMES ARE <type>
ASSUME treats all column values in the given table as being of the given type unless overridden by a column-specific ASSUME or column-specific metadata in the table's definition.
Assign multiple overrides at once for the same table by separating storage_type_definitions with commas:
ASSUME ks.table NAMES ARE uuid, VALUES ARE int, (col) VALUES ARE ascii
ASSUME users NAMES ARE text, VALUES are text; ASSUME users(user_id) VALUES are uuid;