This repository has been archived by the owner on Feb 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
/
cql3.json
64 lines (57 loc) · 4.54 KB
/
cql3.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
"create_ks#cql" : "CREATE KEYSPACE helenus_cql3_test WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 3 };",
"create_ks#cql_v1" : "CREATE KEYSPACE helenus_cql3_test WITH strategy_class=SimpleStrategy AND strategy_options:replication_factor=3",
"use#cql" : "USE helenus_cql3_test",
"drop_ks#cql" : "DROP KEYSPACE helenus_cql3_test",
"static_create_cf#cql" : "CREATE COLUMNFAMILY cql_test (id text, foo text, PRIMARY KEY (id))",
"static_create_cnt_cf#cql" : "CREATE TABLE cql_cnt_test (key varchar PRIMARY KEY, cnt counter)",
"static_drop_cf#cql" : "DROP COLUMNFAMILY cql_test",
"static_update#cql" : "UPDATE cql_test SET foo='bar' WHERE id='foobar'",
"static_update_cnt#cql" : "UPDATE cql_cnt_test SET cnt=cnt+10 WHERE key='1'",
"static_select#cql" : "SELECT foo FROM cql_test WHERE id='foobar'",
"static_select*#cql" : "SELECT * FROM cql_test WHERE id='foobar'",
"static_select_cnt#cql" : "SELECT cnt FROM cql_cnt_test WHERE key='1'",
"static_count#cql" : "SELECT COUNT(1) FROM cql_test WHERE id='foobar'",
"static_countstar#cql" : "SELECT COUNT(*) FROM cql_test WHERE id='foobar'",
"static_delete#cql" : "DELETE FROM cql_test WHERE id='foobar'",
"static_select2#cql" : "SELECT * FROM cql_test WHERE id='%s'",
"static_select2#vals" : ["foobar"],
"dynamic_create_cf#cql" : "CREATE COLUMNFAMILY clicks (userid int, url text, ts timestamp, PRIMARY KEY (userid, url)) WITH COMPACT STORAGE",
"dynamic_update#cql" : "UPDATE clicks SET ts = '?' WHERE userid = ? AND url = '?'",
"dynamic_update#vals1" : ["2012-03-01+0000", 10, "www.example.com"],
"dynamic_update#vals2" : ["2012-03-01+0000", 10, "www.foo.com"],
"dynamic_update#vals3" : ["2012-03-02+0000", 10, "www.foo.com"],
"dynamic_select1#cql" : "SELECT ts FROM clicks WHERE userid = 10",
"dynamic_select2#cql" : "SELECT userid, url, ts FROM clicks WHERE userid = 10 AND url = 'www.foo.com'",
"dense_create_cf#cql" : "CREATE TABLE connections (userid int, ip text, port int, ts timestamp, PRIMARY KEY (userid, ip, port)) WITH COMPACT STORAGE",
"dense_update#cql" : "UPDATE connections SET ts = '?' WHERE userid = ? AND ip = '?' AND port = ?",
"dense_update#vals1" : ["2012-03-01+0000", 10, "192.168.1.1", 8080],
"dense_update#vals2" : ["2012-03-01+0000", 10, "192.168.1.1", 1337],
"dense_update#vals3" : ["2012-03-02+0000", 10, "192.168.1.1", 1337],
"dense_select1#cql" : "SELECT ts, port FROM connections WHERE userid = 10",
"dense_select2#cql" : "SELECT userid, ip, port, ts FROM connections WHERE userid = 10 AND ip = '192.168.1.1' AND port = 1337",
"sparse_create_cf#cql" : "CREATE TABLE timeline (userid int, posted_at timestamp, body text, posted_by text, PRIMARY KEY (userid, posted_at))",
"sparse_update#cql" : "UPDATE timeline SET body = '?', posted_by = '?' WHERE userid = ? AND posted_at = '?'",
"sparse_update#vals1" : ["body text 1", "author1", 10, "2012-03-01 00:00:00+0000"],
"sparse_update#vals2" : ["body text 2", "author2", 10, "2012-03-02 00:00:00+0000"],
"sparse_update#vals3" : ["body text 3", "author3", 10, "2012-03-02 00:00:00+0000"],
"sparse_select1#cql" : "SELECT posted_at, body, posted_by FROM timeline WHERE userid = 10 AND posted_at > '2012-03-01 00:00:00+0000'",
"sparse_select2#cql" : "SELECT body, posted_by FROM timeline WHERE userid = 10 AND posted_at = '2012-03-01 00:00:00+0000'",
"integers_create_cf#cql" : "CREATE TABLE integers (number int, longnumber bigint, varnumber varint, PRIMARY KEY (number))",
"integers_update#cql" : "UPDATE integers set longnumber = ?, varnumber = ? where number = ?",
"integers_update#vals1" : [25, 36, 1],
"integers_update#vals2" : [-25, -36, -1],
"integers_update#vals3" : [-25, -8388607, -2],
"integers_select1#cql" : "SELECT * FROM integers where number = 1",
"integers_select2#cql" : "SELECT * FROM integers where number = -1",
"integers_select3#cql" : "SELECT * FROM integers where number = -2",
"timestamp_create" : "CREATE TABLE timestamps (ts1 timestamp, ts2 timestamp, PRIMARY KEY (ts1))",
"timestamp_update#cql" : "UPDATE timestamps SET ts2 = ? WHERE ts1 = ?",
"timestamp_update#vals1" : [null, null],
"timestamp_update#vals2" : [null, "2100-01-01"],
"timestamp_update#vals3" : [null, "1969-07-20"],
"timestamp_invalid#cql" : "UPDATE timestamps SET ts2 = ? ts1 old = ?",
"timestamp_invalid#vals" : [null, "THIS ISNT A DATE"],
"prepare#cql" : "SELECT * FROM ? WHERE KEY = ?",
"error#cql" : "SOME INVALID CQL"
}