Skip to content

Commit 76923a8

Browse files
Update Console page for 3.1.0 (#920)
## Goal Update the Console documentation to reflect TypeDB Console 3.1.0: no more core/ccloud split, the `--script` argument and its requirements (eg. terminating queries with a newline), and the transaction command argument order. ## Implementation 1. Remove the Core and Cloud differentiation - Console has no distinction now. 2. Document requirements of console scripts, in particular newline termination. 3. Document the order of arguments to open a transaction 4. Update example inputs and outputs 5. Update CLI argument changes 6. Document some of the shortcuts and tricks of Console
1 parent 8fde664 commit 76923a8

File tree

4 files changed

+146
-196
lines changed

4 files changed

+146
-196
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,4 @@
1-
**For the title of this PR:** please follow the grammatical rules of a usual publication title, without capitalisation (except for the first letter). Thus, the title should NOT CONTAIN CODE: no dots, no parentheses, no backticks, no brackets, etc. It needs to be distinctive (not detailed) and succinct (not lengthy). Details of this PR will go in the description. **For the description of this PR:** please replace every line in curly brackets ( { like this } ) with an appropriate description following the guidance. Finally, **please remove this paragraph**.
1+
## Goal
22

3-
## What is the goal of this PR?
43

5-
{ In the form of a paragraph (only use bullet points if strictly necessary), please describe the goal of this PR, why they are valuable to achieve, and reference the related GitHub issues. This section will be automatically compiled into the release notes, so please:
6-
- describe the impact of the change in this PR to the _user_ of this repository (e.g. end user, contributor, developer).
7-
- describe the new product behaviour in _present tense_, and the old behaviour and how it's been changed in _past tense_.
8-
- Use the _Royal We_: _"We"_ made changes, not _"I"_ made changes. }
9-
10-
## What are the changes implemented in this PR?
11-
12-
{ Please explain what you implemented, why your changes are the best way to achieve the goal(s) above. Please describe every method, class and package, by explaining:
13-
- its responsibility,
14-
- how it's expected to behave, and
15-
- how it relates to the adjacent methods/classes/packages it interacts with.
16-
17-
This would allow the reviewer to understand your intentions in the code much better. If you're adding new classes, make sure these explanations are also included in the class header comments. Last but not least, please reference the GitHub issues to be automatically closed, such like 'closes #number'. }
4+
## Implementation

home/modules/ROOT/examples/tql/data_small_single_query.tql

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ insert
33
has username "masako-holley",
44
has phone "185800100011",
55
has email "masako.holley@typedb.com";
6-
76
$u2 isa user,
87
has username "pearle-goodman",
98
has phone "171255522222",
109
has email "pearle.goodman@typedb.com";
11-
1210
$u3 isa user,
1311
has username "kevin-morrison",
1412
has phone "110000000",
1513
has email "kevin.morrison@typedb.com";
16-
1714
$relatives1 isa family (relative: $u1, relative: $u2);
1815
$relatives2 isa family (relative: $u2, relative: $u3);

home/modules/ROOT/examples/tql/schema_small.tql

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
define
22
entity content @abstract,
33
owns id @key;
4-
54
entity page @abstract, sub content,
65
owns page-id,
76
owns name,
87
owns bio,
98
owns profile-picture,
109
plays posting:page,
1110
plays following:page;
12-
1311
entity profile @abstract, sub page,
1412
owns username,
1513
owns name @card(0..3),
1614
plays group-membership:member,
1715
plays location:located,
1816
plays content-engagement:author,
1917
plays following:follower;
20-
2118
entity user sub profile,
2219
owns email,
2320
owns phone @regex("^\d{8,15}$") @unique,
@@ -28,49 +25,38 @@ define
2825
plays relationship:partner,
2926
plays marriage:spouse,
3027
plays employment:employee;
31-
3228
relation social-relation @abstract,
3329
relates related @card(0..);
34-
3530
relation friendship sub social-relation,
3631
relates friend as related @card(0..);
37-
3832
relation family sub social-relation,
3933
relates relative as related @card(0..1000);
40-
4134
relation relationship sub social-relation,
4235
relates partner as related,
4336
owns start-date;
44-
4537
relation marriage sub relationship,
4638
relates spouse as partner,
4739
owns exact-date,
4840
plays location:located;
49-
5041
entity organisation sub profile,
5142
owns tag @card(0..100),
5243
plays employment:employer;
53-
5444
entity company sub organisation;
5545
entity charity sub organisation;
56-
5746
relation employment,
5847
relates employer,
5948
relates employee,
6049
owns start-date,
6150
owns end-date;
62-
6351
entity group sub page,
6452
owns group-id,
6553
owns tag @card(0..100),
6654
plays group-membership:group;
67-
6855
relation group-membership,
6956
relates group,
7057
relates member,
7158
owns start-timestamp,
7259
owns end-timestamp;
73-
7460
entity post @abstract, sub content,
7561
owns post-id,
7662
owns post-text,
@@ -80,12 +66,9 @@ define
8066
plays commenting:parent,
8167
plays reaction:parent,
8268
plays location:located;
83-
8469
entity text-post sub post;
85-
8670
entity image-post sub post,
8771
owns post-image;
88-
8972
entity comment sub content,
9073
owns comment-id,
9174
owns comment-text,
@@ -94,71 +77,57 @@ define
9477
plays commenting:comment,
9578
plays commenting:parent,
9679
plays reaction:parent;
97-
9880
relation interaction @abstract,
9981
relates subject @abstract,
10082
relates content;
101-
10283
relation content-engagement @abstract, sub interaction,
10384
relates author as subject;
104-
10585
relation posting sub content-engagement,
10686
relates page as content,
10787
relates post @card(0..1000);
108-
10988
relation commenting sub content-engagement,
11089
relates parent as content,
11190
relates comment;
112-
11391
relation reaction sub content-engagement,
11492
relates parent as content,
11593
owns emoji @values("like", "love", "funny", "surprise", "sad", "angry"),
11694
owns creation-timestamp;
117-
11895
relation following,
11996
relates follower,
12097
relates page;
121-
12298
entity place,
12399
owns place-id,
124100
owns name,
125101
plays location:place;
126-
127102
entity country sub place,
128103
plays city-location:parent;
129-
130104
entity city sub place,
131105
plays city-location:city;
132-
133106
relation location,
134107
relates place,
135108
relates located;
136-
137109
relation city-location sub location,
138110
relates parent as place,
139111
relates city as located;
140-
112+
# attributes
141113
attribute id @abstract, value string;
142114
attribute page-id @abstract, sub id;
143115
attribute username sub page-id;
144116
attribute group-id sub page-id;
145117
attribute post-id sub id;
146118
attribute comment-id sub id;
147119
attribute place-id sub id;
148-
149120
attribute name value string;
150121
attribute email value string @regex("^.*@\w+\.\w+$");
151122
attribute phone value string;
152123
attribute karma value double;
153124
attribute relationship-status value string @values("single", "married", "other");
154125
attribute latitude value double;
155126
attribute longitude value double;
156-
157127
attribute event-date @abstract, value datetime;
158128
attribute start-date sub event-date;
159129
attribute end-date sub event-date;
160130
attribute exact-date @abstract, sub event-date;
161-
162131
attribute payload @abstract, value string;
163132
attribute text-payload @abstract, sub payload;
164133
attribute image-payload @abstract, sub payload;
@@ -167,14 +136,12 @@ define
167136
attribute post-text sub text-payload;
168137
attribute post-image sub image-payload;
169138
attribute profile-picture sub image-payload;
170-
171139
attribute tag value string;
172140
attribute emoji value string;
173-
174141
attribute creation-timestamp value datetime;
175142
attribute start-timestamp value datetime;
176143
attribute end-timestamp value datetime;
177-
144+
# functions
178145
fun all_relatives($user: user) -> { user }:
179146
match
180147
$relative isa user;

0 commit comments

Comments
 (0)