【发布时间】:2015-12-16 20:57:07
【问题描述】:
表模式:
CREATE TABLE student(
name text,
id int,
class int,
logintime timeuuid,
subject text
PRIMARY KEY ((cust_sub_id, group_id), level, eventtime));
在学生表中插入数据时:
INSERT INTO student(name, id, class, logintime, subject) VALUES ( 'xyz', 10, 12, 242aa080-9e6f-11e5-b62b-903c9927ffc2, 'maths');
它工作正常。 但是可以在cassandra表中插入epochtime/datetime而不是uuid并自动保存为uuid格式吗?
类似:
INSERT INTO student(name, id, class, logintime, subject) VALUES ( 'xyz', 10, 12, 1449663555, 'maths');
如果不可能,那么如何在 Scala 中将 epochtime 转换为 uuid?
或者如何修改现有的uuid增加1天的意思是[exitingDate + 1.day]??
【问题讨论】: