Skip to content

Commit 0db0c0e

Browse files
author
Sean Loiselle
committed
constraint pages
1 parent 0d0b73a commit 0db0c0e

38 files changed

+1457
-318
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ generate/generate
55
Railroad.jar
66
.sass-cache
77
_site
8+
.jekyll-metadata

_data/sidebar_doc.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,15 +199,36 @@ entries:
199199
url: /sql-grammar.html
200200

201201
thirdlevel:
202+
- title: Constraints
203+
thirdlevelitems:
204+
205+
- title: Overview
206+
url: /constraints.html
207+
208+
- title: Check
209+
url: /check.html
210+
211+
- title: Default Value
212+
url: /default-value.html
213+
214+
- title: Foreign Keys
215+
url: /foreign-key.html
216+
217+
- title: Not Null
218+
url: /not-null.html
219+
220+
- title: Primary Key
221+
url: /primary-key.html
222+
223+
- title: Unique
224+
url: /unique.html
225+
202226
- title: Data Definition
203227
thirdlevelitems:
204228

205229
- title: Keywords & Identifiers
206230
url: /keywords-and-identifiers.html
207231

208-
- title: Constraints
209-
url: /constraints.html
210-
211232
- title: Indexes
212233
url: /indexes.html
213234

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<svg width="740" height="248">
2+
3+
<polygon points="9 17 1 13 1 21"></polygon>
4+
<polygon points="17 17 9 13 9 21"></polygon>
5+
<rect x="31" y="3" width="70" height="32" rx="10"></rect>
6+
<rect x="29" y="1" width="70" height="32" class="terminal" rx="10"></rect>
7+
<text class="terminal" x="39" y="21">CREATE</text>
8+
<rect x="121" y="3" width="62" height="32" rx="10"></rect>
9+
<rect x="119" y="1" width="62" height="32" class="terminal" rx="10"></rect>
10+
<text class="terminal" x="129" y="21">TABLE</text>
11+
12+
<rect x="203" y="3" width="94" height="32"></rect>
13+
<rect x="201" y="1" width="94" height="32" class="nonterminal"></rect>
14+
<text class="nonterminal" x="211" y="21">table_name</text>
15+
16+
<rect x="317" y="3" width="26" height="32" rx="10"></rect>
17+
<rect x="315" y="1" width="26" height="32" class="terminal" rx="10"></rect>
18+
<text class="terminal" x="325" y="21">(</text>
19+
20+
<rect x="363" y="3" width="106" height="32"></rect>
21+
<rect x="361" y="1" width="106" height="32" class="nonterminal"></rect>
22+
<text class="nonterminal" x="371" y="21">column_name</text>
23+
24+
25+
<rect x="489" y="3" width="100" height="32"></rect>
26+
<rect x="487" y="1" width="100" height="32" class="nonterminal"></rect>
27+
<text class="nonterminal" x="497" y="21">column_type</text>
28+
29+
<rect x="609" y="3" width="64" height="32" rx="10"></rect>
30+
<rect x="607" y="1" width="64" height="32" class="terminal" rx="10"></rect>
31+
<text class="terminal" x="617" y="21">CHECK</text>
32+
<rect x="693" y="3" width="26" height="32" rx="10"></rect>
33+
<rect x="691" y="1" width="26" height="32" class="terminal" rx="10"></rect>
34+
<text class="terminal" x="701" y="21">(</text>
35+
36+
<rect x="85" y="85" width="90" height="32"></rect>
37+
<rect x="83" y="83" width="90" height="32" class="nonterminal"></rect>
38+
<text class="nonterminal" x="93" y="103">check_expr</text>
39+
40+
<rect x="195" y="85" width="26" height="32" rx="10"></rect>
41+
<rect x="193" y="83" width="26" height="32" class="terminal" rx="10"></rect>
42+
<text class="terminal" x="203" y="103">)</text>
43+
44+
<rect x="261" y="117" width="142" height="32"></rect>
45+
<rect x="259" y="115" width="142" height="32" class="nonterminal"></rect>
46+
<text class="nonterminal" x="269" y="135">column_constraints</text>
47+
48+
<rect x="483" y="85" width="24" height="32" rx="10"></rect>
49+
<rect x="481" y="83" width="24" height="32" class="terminal" rx="10"></rect>
50+
<text class="terminal" x="491" y="103">,</text>
51+
<a xlink:href="sql-grammar.html#column_def" xlink:title="column_def">
52+
<rect x="527" y="85" width="92" height="32"></rect>
53+
<rect x="525" y="83" width="92" height="32" class="nonterminal"></rect>
54+
<text class="nonterminal" x="535" y="103">column_def</text>
55+
</a>
56+
57+
<rect x="471" y="215" width="130" height="32"></rect>
58+
<rect x="469" y="213" width="130" height="32" class="nonterminal"></rect>
59+
<text class="nonterminal" x="479" y="233">table_constraints</text>
60+
61+
<rect x="641" y="183" width="26" height="32" rx="10"></rect>
62+
<rect x="639" y="181" width="26" height="32" class="terminal" rx="10"></rect>
63+
<text class="terminal" x="649" y="201">)</text>
64+
<rect x="687" y="183" width="26" height="32" rx="10"></rect>
65+
<rect x="685" y="181" width="26" height="32" class="terminal" rx="10"></rect>
66+
<text class="terminal" x="695" y="201">)</text>
67+
<path class="line" d="m17 17 h2 m0 0 h10 m70 0 h10 m0 0 h10 m62 0 h10 m0 0 h10 m94 0 h10 m0 0 h10 m26 0 h10 m0 0 h10 m106 0 h10 m0 0 h10 m100 0 h10 m0 0 h10 m64 0 h10 m0 0 h10 m26 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-678 82 l2 0 m2 0 l2 0 m2 0 l2 0 m2 0 h10 m90 0 h10 m0 0 h10 m26 0 h10 m20 0 h10 m0 0 h152 m-182 0 h20 m162 0 h20 m-202 0 q10 0 10 10 m182 0 q0 -10 10 -10 m-192 10 v12 m182 0 v-12 m-182 12 q0 10 10 10 m162 0 q10 0 10 -10 m-172 10 h10 m142 0 h10 m60 -32 h10 m24 0 h10 m0 0 h10 m92 0 h10 m-176 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -12 q0 -10 10 -10 m156 32 l20 0 m-20 0 q10 0 10 -10 l0 -12 q0 -10 -10 -10 m-156 0 h10 m0 0 h146 m-196 32 h20 m196 0 h20 m-236 0 q10 0 10 10 m216 0 q0 -10 10 -10 m-226 10 v14 m216 0 v-14 m-216 14 q0 10 10 10 m196 0 q10 0 10 -10 m-206 10 h10 m0 0 h186 m22 -34 l2 0 m2 0 l2 0 m2 0 l2 0 m-252 98 l2 0 m2 0 l2 0 m2 0 l2 0 m22 0 h10 m0 0 h140 m-170 0 h20 m150 0 h20 m-190 0 q10 0 10 10 m170 0 q0 -10 10 -10 m-180 10 v12 m170 0 v-12 m-170 12 q0 10 10 10 m150 0 q10 0 10 -10 m-160 10 h10 m130 0 h10 m20 -32 h10 m26 0 h10 m0 0 h10 m26 0 h10 m3 0 h-3"></path>
68+
<polygon points="731 197 739 193 739 201"></polygon>
69+
<polygon points="731 197 723 193 723 201"></polygon>
70+
</svg>
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<svg width="758" height="210">
2+
3+
<polygon points="9 61 1 57 1 65"></polygon>
4+
<polygon points="17 61 9 57 9 65"></polygon>
5+
<rect x="31" y="47" width="70" height="32" rx="10"></rect>
6+
<rect x="29" y="45" width="70" height="32" class="terminal" rx="10"></rect>
7+
<text class="terminal" x="39" y="65">CREATE</text>
8+
<rect x="121" y="47" width="62" height="32" rx="10"></rect>
9+
<rect x="119" y="45" width="62" height="32" class="terminal" rx="10"></rect>
10+
<text class="terminal" x="129" y="65">TABLE</text>
11+
12+
<rect x="203" y="47" width="94" height="32"></rect>
13+
<rect x="201" y="45" width="94" height="32" class="nonterminal"></rect>
14+
<text class="nonterminal" x="211" y="65">table_name</text>
15+
16+
<rect x="317" y="47" width="26" height="32" rx="10"></rect>
17+
<rect x="315" y="45" width="26" height="32" class="terminal" rx="10"></rect>
18+
<text class="terminal" x="325" y="65">(</text>
19+
<a xlink:href="sql-grammar.html#column_def" xlink:title="column_def">
20+
<rect x="383" y="47" width="92" height="32"></rect>
21+
<rect x="381" y="45" width="92" height="32" class="nonterminal"></rect>
22+
<text class="nonterminal" x="391" y="65">column_def</text>
23+
</a>
24+
<rect x="383" y="3" width="24" height="32" rx="10"></rect>
25+
<rect x="381" y="1" width="24" height="32" class="terminal" rx="10"></rect>
26+
<text class="terminal" x="391" y="21">,</text>
27+
<rect x="535" y="79" width="108" height="32" rx="10"></rect>
28+
<rect x="533" y="77" width="108" height="32" class="terminal" rx="10"></rect>
29+
<text class="terminal" x="543" y="97">CONSTRAINT</text>
30+
<a xlink:href="sql-grammar.html#name" xlink:title="name">
31+
<rect x="663" y="79" width="54" height="32"></rect>
32+
<rect x="661" y="77" width="54" height="32" class="nonterminal"></rect>
33+
<text class="nonterminal" x="671" y="97">name</text>
34+
</a>
35+
<rect x="229" y="145" width="64" height="32" rx="10"></rect>
36+
<rect x="227" y="143" width="64" height="32" class="terminal" rx="10"></rect>
37+
<text class="terminal" x="237" y="163">CHECK</text>
38+
<rect x="313" y="145" width="26" height="32" rx="10"></rect>
39+
<rect x="311" y="143" width="26" height="32" class="terminal" rx="10"></rect>
40+
<text class="terminal" x="321" y="163">(</text>
41+
42+
<rect x="359" y="145" width="90" height="32"></rect>
43+
<rect x="357" y="143" width="90" height="32" class="nonterminal"></rect>
44+
<text class="nonterminal" x="367" y="163">check_expr</text>
45+
46+
<rect x="469" y="145" width="26" height="32" rx="10"></rect>
47+
<rect x="467" y="143" width="26" height="32" class="terminal" rx="10"></rect>
48+
<text class="terminal" x="477" y="163">)</text>
49+
50+
<rect x="535" y="177" width="130" height="32"></rect>
51+
<rect x="533" y="175" width="130" height="32" class="nonterminal"></rect>
52+
<text class="nonterminal" x="543" y="195">table_constraints</text>
53+
54+
<rect x="705" y="145" width="26" height="32" rx="10"></rect>
55+
<rect x="703" y="143" width="26" height="32" class="terminal" rx="10"></rect>
56+
<text class="terminal" x="713" y="163">)</text>
57+
<path class="line" d="m17 61 h2 m0 0 h10 m70 0 h10 m0 0 h10 m62 0 h10 m0 0 h10 m94 0 h10 m0 0 h10 m26 0 h10 m20 0 h10 m92 0 h10 m-132 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m112 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-112 0 h10 m24 0 h10 m0 0 h68 m40 44 h10 m0 0 h192 m-222 0 h20 m202 0 h20 m-242 0 q10 0 10 10 m222 0 q0 -10 10 -10 m-232 10 v12 m222 0 v-12 m-222 12 q0 10 10 10 m202 0 q10 0 10 -10 m-212 10 h10 m108 0 h10 m0 0 h10 m54 0 h10 m22 -32 l2 0 m2 0 l2 0 m2 0 l2 0 m-552 98 l2 0 m2 0 l2 0 m2 0 l2 0 m2 0 h10 m64 0 h10 m0 0 h10 m26 0 h10 m0 0 h10 m90 0 h10 m0 0 h10 m26 0 h10 m20 0 h10 m0 0 h140 m-170 0 h20 m150 0 h20 m-190 0 q10 0 10 10 m170 0 q0 -10 10 -10 m-180 10 v12 m170 0 v-12 m-170 12 q0 10 10 10 m150 0 q10 0 10 -10 m-160 10 h10 m130 0 h10 m20 -32 h10 m26 0 h10 m3 0 h-3"></path>
58+
<polygon points="749 159 757 155 757 163"></polygon>
59+
<polygon points="749 159 741 155 741 163"></polygon>
60+
</svg>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<svg width="710" height="248">
2+
3+
<polygon points="9 17 1 13 1 21"></polygon>
4+
<polygon points="17 17 9 13 9 21"></polygon>
5+
<rect x="31" y="3" width="70" height="32" rx="10"></rect>
6+
<rect x="29" y="1" width="70" height="32" class="terminal" rx="10"></rect>
7+
<text class="terminal" x="39" y="21">CREATE</text>
8+
<rect x="121" y="3" width="62" height="32" rx="10"></rect>
9+
<rect x="119" y="1" width="62" height="32" class="terminal" rx="10"></rect>
10+
<text class="terminal" x="129" y="21">TABLE</text>
11+
12+
<rect x="203" y="3" width="94" height="32"></rect>
13+
<rect x="201" y="1" width="94" height="32" class="nonterminal"></rect>
14+
<text class="nonterminal" x="211" y="21">table_name</text>
15+
16+
<rect x="317" y="3" width="26" height="32" rx="10"></rect>
17+
<rect x="315" y="1" width="26" height="32" class="terminal" rx="10"></rect>
18+
<text class="terminal" x="325" y="21">(</text>
19+
20+
<rect x="363" y="3" width="106" height="32"></rect>
21+
<rect x="361" y="1" width="106" height="32" class="nonterminal"></rect>
22+
<text class="nonterminal" x="371" y="21">column_name</text>
23+
24+
25+
<rect x="489" y="3" width="100" height="32"></rect>
26+
<rect x="487" y="1" width="100" height="32" class="nonterminal"></rect>
27+
<text class="nonterminal" x="497" y="21">column_type</text>
28+
29+
<rect x="609" y="3" width="80" height="32" rx="10"></rect>
30+
<rect x="607" y="1" width="80" height="32" class="terminal" rx="10"></rect>
31+
<text class="terminal" x="617" y="21">DEFAULT</text>
32+
33+
<rect x="85" y="85" width="106" height="32"></rect>
34+
<rect x="83" y="83" width="106" height="32" class="nonterminal"></rect>
35+
<text class="nonterminal" x="93" y="103">default_value</text>
36+
37+
<a xlink:href="sql-grammar.html#column_constraints" xlink:title="column_constraints">
38+
<rect x="231" y="117" width="142" height="32"></rect>
39+
<rect x="229" y="115" width="142" height="32" class="nonterminal"></rect>
40+
<text class="nonterminal" x="239" y="135">column_constraints</text>
41+
</a>
42+
<rect x="453" y="85" width="24" height="32" rx="10"></rect>
43+
<rect x="451" y="83" width="24" height="32" class="terminal" rx="10"></rect>
44+
<text class="terminal" x="461" y="103">,</text>
45+
<a xlink:href="sql-grammar.html#column_def" xlink:title="column_def">
46+
<rect x="497" y="85" width="92" height="32"></rect>
47+
<rect x="495" y="83" width="92" height="32" class="nonterminal"></rect>
48+
<text class="nonterminal" x="505" y="103">column_def</text>
49+
</a>
50+
51+
<rect x="441" y="215" width="130" height="32"></rect>
52+
<rect x="439" y="213" width="130" height="32" class="nonterminal"></rect>
53+
<text class="nonterminal" x="449" y="233">table_constraints</text>
54+
55+
<rect x="611" y="183" width="26" height="32" rx="10"></rect>
56+
<rect x="609" y="181" width="26" height="32" class="terminal" rx="10"></rect>
57+
<text class="terminal" x="619" y="201">)</text>
58+
<rect x="657" y="183" width="26" height="32" rx="10"></rect>
59+
<rect x="655" y="181" width="26" height="32" class="terminal" rx="10"></rect>
60+
<text class="terminal" x="665" y="201">)</text>
61+
<path class="line" d="m17 17 h2 m0 0 h10 m70 0 h10 m0 0 h10 m62 0 h10 m0 0 h10 m94 0 h10 m0 0 h10 m26 0 h10 m0 0 h10 m106 0 h10 m0 0 h10 m100 0 h10 m0 0 h10 m80 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-648 82 l2 0 m2 0 l2 0 m2 0 l2 0 m2 0 h10 m106 0 h10 m20 0 h10 m0 0 h152 m-182 0 h20 m162 0 h20 m-202 0 q10 0 10 10 m182 0 q0 -10 10 -10 m-192 10 v12 m182 0 v-12 m-182 12 q0 10 10 10 m162 0 q10 0 10 -10 m-172 10 h10 m142 0 h10 m60 -32 h10 m24 0 h10 m0 0 h10 m92 0 h10 m-176 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -12 q0 -10 10 -10 m156 32 l20 0 m-20 0 q10 0 10 -10 l0 -12 q0 -10 -10 -10 m-156 0 h10 m0 0 h146 m-196 32 h20 m196 0 h20 m-236 0 q10 0 10 10 m216 0 q0 -10 10 -10 m-226 10 v14 m216 0 v-14 m-216 14 q0 10 10 10 m196 0 q10 0 10 -10 m-206 10 h10 m0 0 h186 m22 -34 l2 0 m2 0 l2 0 m2 0 l2 0 m-252 98 l2 0 m2 0 l2 0 m2 0 l2 0 m22 0 h10 m0 0 h140 m-170 0 h20 m150 0 h20 m-190 0 q10 0 10 10 m170 0 q0 -10 10 -10 m-180 10 v12 m170 0 v-12 m-170 12 q0 10 10 10 m150 0 q10 0 10 -10 m-160 10 h10 m130 0 h10 m20 -32 h10 m26 0 h10 m0 0 h10 m26 0 h10 m3 0 h-3"></path>
62+
<polygon points="701 197 709 193 709 201"></polygon>
63+
<polygon points="701 197 693 193 693 201"></polygon>
64+
</svg>

0 commit comments

Comments
 (0)