小编fah*_*had的帖子

如何在scylladb和cassandra中使用静态列?

我是scylladb和cassandra的新手,我在查询表中的数据方面遇到了一些问题,以下是我创建的模式:

CREATE TABLE usercontacts (
  userID bigint,                        -- userID 
  contactID bigint,                     -- Contact ID lynkApp userID  
  contactDeviceToken text,              -- Device Token    
  modifyDate timestamp static ,     
  PRIMARY KEY  (contactID,userID)
);



CREATE MATERIALIZED VIEW usercontacts_by_contactid 
AS SELECT userID, contactID, contactDeviceToken,
FROM usercontacts 
contactID IS NOT NULL AND userID IS NOT NULL AND modifyDate IS NOT NULL 
-- Need to not null as these are the primary keys in main
-- table same structure as the main table
PRIMARY KEY(userID,contactID);



CREATE MATERIALIZED VIEW …
Run Code Online (Sandbox Code Playgroud)

cassandra scylla

1
推荐指数
1
解决办法
163
查看次数

标签 统计

cassandra ×1

scylla ×1