Skip to content

Instantly share code, notes, and snippets.

@tux21b
Created August 26, 2012 19:47
Show Gist options
  • Save tux21b/3483042 to your computer and use it in GitHub Desktop.
Save tux21b/3483042 to your computer and use it in GitHub Desktop.
LIMIT isn't working as expected...
DROP KEYSPACE gocql_wiki;
CREATE KEYSPACE gocql_wiki
WITH strategy_class = 'SimpleStrategy'
AND strategy_options:replication_factor = 1;
USE gocql_wiki;
CREATE TABLE page (
title varchar,
revid timeuuid,
body varchar,
hits int,
protected boolean,
modified timestamp,
attachment blob,
PRIMARY KEY (title, revid)
);
INSERT INTO page (title,revid,body,hits,modified,protected)
VALUES ('LoremIpsum','2012-08-26 21:35:02+0000','Lorem ipsum dolor sit amet',12,'2012-08-22 12:00:08+0000','true');
INSERT INTO page (title,revid,body,hits,modified,protected)
VALUES ('Frontpage','2012-08-24 21:35:02+0000','Hello world!',0,'2012-08-20 12:00:00+0000','false');
INSERT INTO page (title,revid,attachment,body,hits,modified,protected) VALUES
('Frontpage','2012-08-26 21:35:02+0000','696d67206461746100','Hello modified world!',0,'2012-08-22 12:00:00+0000','false');
SELECT * FROM page;
SELECT * FROM page LIMIT 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment