Reputation: 5808
We have a usecase of allowing only certain values in a cassandra column.
Example:
CREATED TABLE Cars(
company text,
model text,
year int,
vin text
)
where a company may be from a spcific list of car makers e.g. GM, Toyota, Honda etc.
Does cassandra support defining constraints for above use-case ? OR this needs to be handled at program level ?
Upvotes: 2
Views: 166
Reputation: 6218
There is no in built support for enums in cassandra.
But Datastax drivers does have option to define custom codec, which might help.
Upvotes: 4