on master help sign in
update README for new transaction operators
f7b464dAgentM
README.markdown+55−5
@@ -26,7 +26,7 @@ At this point, there are three types of command which can be executed:
261. relational algebra expressions such as:
261. relational algebra expressions such as:
27
27
28 ```
28 ```
29−TutorialD: :s S join P
29+TutorialD (master): :showExpr S join P
30┌──────┬─────┬──┬─────┬──┬─────┬──────┬──────┐
30┌──────┬─────┬──┬─────┬──┬─────┬──────┬──────┐
31│CITY │COLOR│P#│PNAME│S#│SNAME│STATUS│WEIGHT│
31│CITY │COLOR│P#│PNAME│S#│SNAME│STATUS│WEIGHT│
32├──────┼─────┼──┼─────┼──┼─────┼──────┼──────┤
32├──────┼─────┼──┼─────┼──┼─────┼──────┼──────┤
@@ -43,26 +43,76 @@ TutorialD: :s S join P
43└──────┴─────┴──┴─────┴──┴─────┴──────┴──────┘
43└──────┴─────┴──┴─────┴──┴─────┴──────┴──────┘
44```
44```
45
45
46− where ":s" instructs the interpreter to show the resultant relation, "S" and "P" are relation names, and "join" is the join operator.
46+ where ":show" instructs the interpreter to show the resultant relation, "S" and "P" are relation names, and "join" is the join operator.
472. interpreter-level queries such as:
472. interpreter-level queries such as:
48
48
49 ```
49 ```
50−TutorialD: :t S
50+TutorialD (master): :type S
51{CITY "char", S# "char", SNAME "char", STATUS "char"}
51{CITY "char", S# "char", SNAME "char", STATUS "char"}
52```
52```
53
53
54 which shows the Tutorial D type for a relational expression and
54 which shows the Tutorial D type for a relational expression and
55
55
56 ```
56 ```
57−TutorialD: :c
57+TutorialD (master): :constraints
58fromList []
58fromList []
59```
59```
60which displays database constraints.
60which displays database constraints.
61
61
62+ ```
63+TutorialD (master): :commit
64+```
65+which commits the current "disconnected" transaction which is similar to the git staging area/index.
66+
67+ ```
68+TutorialD (master): :jumphead master
69+Done.
70+```
71+which changes the current disconnected transaction to reference another head.
72+
73+ ```
74+TutorialD (master): :jump 4a4ee715-297d-49db-bfd1-afaefadc902b
75+Done.
76+```
77+which resets the current "disconnected" transaction to refer to the committed transaction specified by the UUID.
78+
79+ ```
80+TutorialD (master): :branch devel
81+Done.
82+```
83+
84+which creates a new head named "devel" in the transaction graph and resets the current "disconnected" transaction to refer to the
85+
86+ ```
87+TutorialD (devel): :rollback
88+Done.
89+```
90+
91+which resets the current "disconnected" transaction to discard any collected changes.
92+
93+ ```
94+TutorialD (devel): :showGraph
95+┌───────┬────────────────────────────────────┬──────────────────────────────────────┐
96+│current│id │parents │
97+├───────┼────────────────────────────────────┼──────────────────────────────────────┤
98+│1 │1d064d54-cd2a-4a43-822a-cbd18cf7c4e8│┌────────────────────────────────────┐│
99+│ │ ││id ││
100+│ │ │├────────────────────────────────────┤│
101+│ │ ││4a4ee715-297d-49db-bfd1-afaefadc902b││
102+│ │ │└────────────────────────────────────┘│
103+│0 │4a4ee715-297d-49db-bfd1-afaefadc902b│┌──┐ │
104+│ │ ││id│ │
105+│ │ │ │
106+│ │ │└──┘ │
107+└───────┴────────────────────────────────────┴──────────────────────────────────────┘
108+```
109+
110+which displays all committed transactions and their parents. The "current" attribute indicates to which transactions the current "disconnected" transaction refers.
111+
623. expressions which modify the database context such as:
1123. expressions which modify the database context such as:
63
113
64 ```
114 ```
65−TutorialD: x := S JOIN P
115+TutorialD (master): x := S JOIN P
66```
116```
67 which sets the relational variable named "x" to the results of "S join P" if the database constraint checking succeeds.
117 which sets the relational variable named "x" to the results of "S join P" if the database constraint checking succeeds.
68
118