Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 28c9836

Browse filesBrowse files
makapszennaAdrianna Zychewicz
andauthored
BAEL-4977 CQL Data Types (eugenp#11017)
Co-authored-by: Adrianna Zychewicz <adrianna.zychewicz@decerto.pl>
1 parent f43d631 commit 28c9836
Copy full SHA for 28c9836

File tree

Expand file treeCollapse file tree

1 file changed

+75
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+75
-0
lines changed
Open diff view settings
Collapse file
+75Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
CREATE
2+
KEYSPACE baeldung
3+
WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 1};
4+
USE baeldung;
5+
6+
CREATE TABLE numeric_types
7+
(
8+
type1 int PRIMARY KEY,
9+
type2 bigint,
10+
type3 smallint,
11+
type4 tinyint,
12+
type5 varint,
13+
type6 float,
14+
type7 double,
15+
type8 decimal
16+
);
17+
18+
CREATE TABLE text_types
19+
(
20+
primaryKey int PRIMARY KEY,
21+
type2 text,
22+
type3 varchar,
23+
type4 ascii
24+
);
25+
26+
CREATE TABLE date_types
27+
(
28+
primaryKey int PRIMARY KEY,
29+
type1 timestamp,
30+
type2 time,
31+
type3 date,
32+
type4 timeuuid,
33+
type5 duration
34+
);
35+
36+
CREATE TABLE other_types
37+
(
38+
primaryKey int PRIMARY KEY,
39+
type1 boolean,
40+
type2 uuid,
41+
type3 blob,
42+
type4 inet
43+
);
44+
45+
CREATE TABLE counter_type
46+
(
47+
primaryKey uuid PRIMARY KEY,
48+
type1 counter
49+
);
50+
51+
CREATE TABLE collection_types
52+
(
53+
primaryKey int PRIMARY KEY,
54+
email set<text>
55+
);
56+
57+
ALTER TABLE collection_types
58+
ADD scores list<text>;
59+
60+
ALTER TABLE collection_types
61+
ADD address map<uuid, text>;
62+
63+
CREATE TABLE tuple_type
64+
(
65+
primaryKey int PRIMARY KEY,
66+
type1 tuple<int, text, float>
67+
);
68+
69+
CREATE TYPE user_defined_type ( type1 timestamp, type2 text, type3 text, type4 text);
70+
71+
CREATE TABLE user_type
72+
(
73+
primaryKey int PRIMARY KEY,
74+
our_type user_defined_type
75+
);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.