-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.cql
118 lines (91 loc) · 3.32 KB
/
bootstrap.cql
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
CREATE KEYSPACE test
WITH REPLICATION = {
'class': 'SimpleStrategy',
'replication_factor': 1
};
CREATE TABLE test.people (
id int,
age int,
created boolean,
name text,
time int,
PRIMARY KEY (id)
);
CREATE TABLE test.people_custom_id (
custom_id int,
age int,
created boolean,
name text,
time int,
PRIMARY KEY (custom_id)
);
CREATE TABLE test.people_rooms (
people_id int,
room_id int,
time int,
admin boolean,
PRIMARY KEY ((people_id, room_id), time)
);
CREATE TABLE test.people_rooms_custom_id_separator (
people_id int,
room_id int,
time int,
admin boolean,
PRIMARY KEY ((people_id, room_id), time)
);
CREATE TABLE test.people_mv (
id int,
name text,
PRIMARY KEY (id)
);
CREATE MATERIALIZED VIEW test.people_mv_by_name
AS SELECT name
FROM test.people_mv
WHERE name IS NOT NULL
PRIMARY KEY (name, id);
CREATE TABLE test.adapter_tests_people (
id text,
name text,
age int,
created boolean,
PRIMARY KEY (id)
);
CREATE TABLE test.adapter_tests_people_custom_id (
custom_id text,
name text,
age int,
created boolean,
PRIMARY KEY (custom_id)
);
CREATE TABLE test.todos (
id int,
text text,
complete boolean,
PRIMARY KEY (id)
);
CREATE CUSTOM INDEX ON test.adapter_tests_people (name) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = { 'mode': 'CONTAINS' };
CREATE CUSTOM INDEX ON test.adapter_tests_people (age) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = { 'mode': 'SPARSE' };
CREATE CUSTOM INDEX ON test.adapter_tests_people (created) USING 'org.apache.cassandra.index.sasi.SASIIndex';
CREATE CUSTOM INDEX ON test.adapter_tests_people_custom_id (name) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = { 'mode': 'CONTAINS' };
CREATE CUSTOM INDEX ON test.adapter_tests_people_custom_id (age) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = { 'mode': 'SPARSE' };
CREATE CUSTOM INDEX ON test.adapter_tests_people_custom_id (created) USING 'org.apache.cassandra.index.sasi.SASIIndex';
CREATE CUSTOM INDEX ON test.people (name) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = { 'mode': 'CONTAINS' };
CREATE CUSTOM INDEX ON test.people (age) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = { 'mode': 'SPARSE' };
CREATE CUSTOM INDEX ON test.people (created) USING 'org.apache.cassandra.index.sasi.SASIIndex';
CREATE CUSTOM INDEX ON test.people (time) USING 'org.apache.cassandra.index.sasi.SASIIndex';
CREATE CUSTOM INDEX ON test.people_custom_id (age) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = { 'mode': 'SPARSE' };
CREATE CUSTOM INDEX ON test.people_custom_id (name) USING 'org.apache.cassandra.index.sasi.SASIIndex'
WITH OPTIONS = { 'mode': 'CONTAINS' };
CREATE CUSTOM INDEX ON test.people_custom_id (created) USING 'org.apache.cassandra.index.sasi.SASIIndex';
CREATE CUSTOM INDEX ON test.people_custom_id (time) USING 'org.apache.cassandra.index.sasi.SASIIndex';
CREATE CUSTOM INDEX ON test.people_rooms (admin) USING 'org.apache.cassandra.index.sasi.SASIIndex';
CREATE CUSTOM INDEX ON test.people_rooms_custom_id_separator (admin) USING 'org.apache.cassandra.index.sasi.SASIIndex';
CREATE CUSTOM INDEX ON test.todos (text) USING 'org.apache.cassandra.index.sasi.SASIIndex';
CREATE CUSTOM INDEX ON test.todos (complete) USING 'org.apache.cassandra.index.sasi.SASIIndex';