Page MenuHomePhabricator
Paste P5479

Masterwork From Distant Lands
ActivePublic

Authored by Eevans on May 23 2017, 7:53 PM.
Tags
None
Referenced Files
F8170297: Masterwork From Distant Lands
May 23 2017, 7:53 PM
Subscribers
None
CREATE KEYSPACE IF NOT EXISTS xxxxx WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1};
DROP TABLE IF EXISTS xxxxx.test;
CREATE TABLE IF NOT EXISTS xxxxx.test (
key text,
rev int,
tid timeuuid,
value text,
PRIMARY KEY (key, rev, tid)
) WITH CLUSTERING ORDER BY (rev DESC, tid DESC);
INSERT INTO xxxxx.test (key,rev,tid,value) VALUES ('foo', 1, 86dea6c2-3fef-11e7-bfeb-843a4b0e8994, 'nonce');
INSERT INTO xxxxx.test (key,rev,tid,value) VALUES ('foo', 1, 876948ea-3fef-11e7-bfeb-843a4b0e8994, 'nonce');
INSERT INTO xxxxx.test (key,rev,tid,value) VALUES ('foo', 1, 87ce1ee6-3fef-11e7-bfeb-843a4b0e8994, 'nonce');
INSERT INTO xxxxx.test (key,rev,tid,value) VALUES ('foo', 2, 883b7c66-3fef-11e7-bfeb-843a4b0e8994, 'nonce');
INSERT INTO xxxxx.test (key,rev,tid,value) VALUES ('foo', 2, 88a5b66c-3fef-11e7-bfeb-843a4b0e8994, 'nonce');
INSERT INTO xxxxx.test (key,rev,tid,value) VALUES ('foo', 2, de2706ae-3fef-11e7-bfeb-843a4b0e8994, 'nonce');
INSERT INTO xxxxx.test (key,rev,tid,value) VALUES ('foo', 3, de8e3b62-3fef-11e7-bfeb-843a4b0e8994, 'nonce');
INSERT INTO xxxxx.test (key,rev,tid,value) VALUES ('foo', 3, defcf048-3fef-11e7-bfeb-843a4b0e8994, 'nonce');
INSERT INTO xxxxx.test (key,rev,tid,value) VALUES ('foo', 3, df6b80da-3fef-11e7-bfeb-843a4b0e8994, 'nonce');
DELETE FROM xxxxx.test WHERE key = 'foo' AND rev = 3 AND tid < defcf048-3fef-11e7-bfeb-843a4b0e8994;
DELETE FROM xxxxx.test WHERE key = 'foo' AND rev < 3;
SELECT rev,tid FROM xxxxx.test WHERE key = 'foo';

Event Timeline

Eevans changed the title of this paste from untitled to Masterwork From Distant Lands.
Eevans updated the paste's language from autodetect to autodetect.