Skip to content

Commit

Permalink
Merge pull request #437 from cockroachdb/mj/index-names
Browse files Browse the repository at this point in the history
Specify some parameter names
  • Loading branch information
maddyblue authored Jul 7, 2016
2 parents c96063a + e547d33 commit 48bdb70
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 54 deletions.
106 changes: 53 additions & 53 deletions _includes/sql/diagrams/create_index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<svg width="762" height="456">
<svg width="744" height="456">

<polygon points="9 17 1 13 1 21"></polygon>
<polygon points="17 17 9 13 9 21"></polygon>
Expand All @@ -20,60 +20,60 @@
<rect x="499" y="67" width="68" height="32" rx="10"></rect>
<rect x="497" y="65" width="68" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="507" y="85">EXISTS</text>
<a xlink:href="sql-grammar.html#name" xlink:title="name">
<rect x="607" y="35" width="54" height="32"></rect>
<rect x="605" y="33" width="54" height="32" class="nonterminal"></rect>
<text class="nonterminal" x="615" y="53">name</text>
<a xlink:href="sql-grammar.html#index_name" xlink:title="index_name">
<rect x="607" y="35" width="96" height="32"></rect>
<rect x="605" y="33" width="96" height="32" class="nonterminal"></rect>
<text class="nonterminal" x="615" y="53">index_name</text>
</a>
<rect x="701" y="3" width="40" height="32" rx="10"></rect>
<rect x="699" y="1" width="40" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="709" y="21">ON</text>
<a xlink:href="sql-grammar.html#qualified_name" xlink:title="qualified_name">
<rect x="164" y="177" width="116" height="32"></rect>
<rect x="162" y="175" width="116" height="32" class="nonterminal"></rect>
<text class="nonterminal" x="172" y="195">qualified_name</text>
<rect x="110" y="177" width="40" height="32" rx="10"></rect>
<rect x="108" y="175" width="40" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="118" y="195">ON</text>
<a xlink:href="sql-grammar.html#table_name" xlink:title="table_name">
<rect x="170" y="177" width="94" height="32"></rect>
<rect x="168" y="175" width="94" height="32" class="nonterminal"></rect>
<text class="nonterminal" x="178" y="195">table_name</text>
</a>
<rect x="300" y="177" width="26" height="32" rx="10"></rect>
<rect x="298" y="175" width="26" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="308" y="195">(</text>
<a xlink:href="sql-grammar.html#name" xlink:title="name">
<rect x="366" y="177" width="54" height="32"></rect>
<rect x="364" y="175" width="54" height="32" class="nonterminal"></rect>
<text class="nonterminal" x="374" y="195">name</text>
<rect x="284" y="177" width="26" height="32" rx="10"></rect>
<rect x="282" y="175" width="26" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="292" y="195">(</text>
<a xlink:href="sql-grammar.html#column_name" xlink:title="column_name">
<rect x="350" y="177" width="106" height="32"></rect>
<rect x="348" y="175" width="106" height="32" class="nonterminal"></rect>
<text class="nonterminal" x="358" y="195">column_name</text>
</a>
<rect x="460" y="209" width="46" height="32" rx="10"></rect>
<rect x="458" y="207" width="46" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="468" y="227">ASC</text>
<rect x="460" y="253" width="56" height="32" rx="10"></rect>
<rect x="458" y="251" width="56" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="468" y="271">DESC</text>
<rect x="366" y="133" width="24" height="32" rx="10"></rect>
<rect x="364" y="131" width="24" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="374" y="151">,</text>
<rect x="576" y="177" width="26" height="32" rx="10"></rect>
<rect x="574" y="175" width="26" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="584" y="195">)</text>
<rect x="397" y="363" width="92" height="32" rx="10"></rect>
<rect x="395" y="361" width="92" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="405" y="381">COVERING</text>
<rect x="397" y="407" width="82" height="32" rx="10"></rect>
<rect x="395" y="405" width="82" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="405" y="425">STORING</text>
<rect x="529" y="363" width="26" height="32" rx="10"></rect>
<rect x="527" y="361" width="26" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="537" y="381">(</text>
<a xlink:href="sql-grammar.html#name" xlink:title="name">
<rect x="595" y="363" width="54" height="32"></rect>
<rect x="593" y="361" width="54" height="32" class="nonterminal"></rect>
<text class="nonterminal" x="603" y="381">name</text>
<rect x="496" y="209" width="46" height="32" rx="10"></rect>
<rect x="494" y="207" width="46" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="504" y="227">ASC</text>
<rect x="496" y="253" width="56" height="32" rx="10"></rect>
<rect x="494" y="251" width="56" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="504" y="271">DESC</text>
<rect x="350" y="133" width="24" height="32" rx="10"></rect>
<rect x="348" y="131" width="24" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="358" y="151">,</text>
<rect x="612" y="177" width="26" height="32" rx="10"></rect>
<rect x="610" y="175" width="26" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="620" y="195">)</text>
<rect x="327" y="363" width="92" height="32" rx="10"></rect>
<rect x="325" y="361" width="92" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="335" y="381">COVERING</text>
<rect x="327" y="407" width="82" height="32" rx="10"></rect>
<rect x="325" y="405" width="82" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="335" y="425">STORING</text>
<rect x="459" y="363" width="26" height="32" rx="10"></rect>
<rect x="457" y="361" width="26" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="467" y="381">(</text>
<a xlink:href="sql-grammar.html#column_name" xlink:title="column_name">
<rect x="525" y="363" width="106" height="32"></rect>
<rect x="523" y="361" width="106" height="32" class="nonterminal"></rect>
<text class="nonterminal" x="533" y="381">column_name</text>
</a>
<rect x="595" y="319" width="24" height="32" rx="10"></rect>
<rect x="593" y="317" width="24" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="603" y="337">,</text>
<rect x="689" y="363" width="26" height="32" rx="10"></rect>
<rect x="687" y="361" width="26" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="697" y="381">)</text>
<path class="line" d="m17 17 h2 m0 0 h10 m70 0 h10 m20 0 h10 m0 0 h84 m-114 0 h20 m94 0 h20 m-134 0 q10 0 10 10 m114 0 q0 -10 10 -10 m-124 10 v12 m114 0 v-12 m-114 12 q0 10 10 10 m94 0 q10 0 10 -10 m-104 10 h10 m74 0 h10 m20 -32 h10 m62 0 h10 m20 0 h10 m0 0 h314 m-344 0 h20 m324 0 h20 m-364 0 q10 0 10 10 m344 0 q0 -10 10 -10 m-354 10 v12 m344 0 v-12 m-344 12 q0 10 10 10 m324 0 q10 0 10 -10 m-314 10 h10 m0 0 h200 m-230 0 h20 m210 0 h20 m-250 0 q10 0 10 10 m230 0 q0 -10 10 -10 m-240 10 v12 m230 0 v-12 m-230 12 q0 10 10 10 m210 0 q10 0 10 -10 m-220 10 h10 m34 0 h10 m0 0 h10 m48 0 h10 m0 0 h10 m68 0 h10 m20 -32 h10 m54 0 h10 m20 -32 h10 m40 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-621 174 l2 0 m2 0 l2 0 m2 0 l2 0 m2 0 h10 m116 0 h10 m0 0 h10 m26 0 h10 m20 0 h10 m54 0 h10 m20 0 h10 m0 0 h66 m-96 0 h20 m76 0 h20 m-116 0 q10 0 10 10 m96 0 q0 -10 10 -10 m-106 10 v12 m96 0 v-12 m-96 12 q0 10 10 10 m76 0 q10 0 10 -10 m-86 10 h10 m46 0 h10 m0 0 h10 m-86 -10 v20 m96 0 v-20 m-96 20 v24 m96 0 v-24 m-96 24 q0 10 10 10 m76 0 q10 0 10 -10 m-86 10 h10 m56 0 h10 m-190 -76 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m190 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-190 0 h10 m24 0 h10 m0 0 h146 m20 44 h10 m26 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-289 186 l2 0 m2 0 l2 0 m2 0 l2 0 m42 0 h10 m92 0 h10 m-132 0 h20 m112 0 h20 m-152 0 q10 0 10 10 m132 0 q0 -10 10 -10 m-142 10 v24 m132 0 v-24 m-132 24 q0 10 10 10 m112 0 q10 0 10 -10 m-122 10 h10 m82 0 h10 m0 0 h10 m20 -44 h10 m26 0 h10 m20 0 h10 m54 0 h10 m-94 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m74 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-74 0 h10 m24 0 h10 m0 0 h30 m20 44 h10 m26 0 h10 m-378 0 h20 m358 0 h20 m-398 0 q10 0 10 10 m378 0 q0 -10 10 -10 m-388 10 v58 m378 0 v-58 m-378 58 q0 10 10 10 m358 0 q10 0 10 -10 m-368 10 h10 m0 0 h348 m23 -78 h-3"></path>
<polygon points="753 377 761 373 761 381"></polygon>
<polygon points="753 377 745 373 745 381"></polygon>
<rect x="525" y="319" width="24" height="32" rx="10"></rect>
<rect x="523" y="317" width="24" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="533" y="337">,</text>
<rect x="671" y="363" width="26" height="32" rx="10"></rect>
<rect x="669" y="361" width="26" height="32" class="terminal" rx="10"></rect>
<text class="terminal" x="679" y="381">)</text>
<path class="line" d="m17 17 h2 m0 0 h10 m70 0 h10 m20 0 h10 m0 0 h84 m-114 0 h20 m94 0 h20 m-134 0 q10 0 10 10 m114 0 q0 -10 10 -10 m-124 10 v12 m114 0 v-12 m-114 12 q0 10 10 10 m94 0 q10 0 10 -10 m-104 10 h10 m74 0 h10 m20 -32 h10 m62 0 h10 m20 0 h10 m0 0 h356 m-386 0 h20 m366 0 h20 m-406 0 q10 0 10 10 m386 0 q0 -10 10 -10 m-396 10 v12 m386 0 v-12 m-386 12 q0 10 10 10 m366 0 q10 0 10 -10 m-356 10 h10 m0 0 h200 m-230 0 h20 m210 0 h20 m-250 0 q10 0 10 10 m230 0 q0 -10 10 -10 m-240 10 v12 m230 0 v-12 m-230 12 q0 10 10 10 m210 0 q10 0 10 -10 m-220 10 h10 m34 0 h10 m0 0 h10 m48 0 h10 m0 0 h10 m68 0 h10 m20 -32 h10 m96 0 h10 m22 -32 l2 0 m2 0 l2 0 m2 0 l2 0 m-657 174 l2 0 m2 0 l2 0 m2 0 l2 0 m2 0 h10 m40 0 h10 m0 0 h10 m94 0 h10 m0 0 h10 m26 0 h10 m20 0 h10 m106 0 h10 m20 0 h10 m0 0 h66 m-96 0 h20 m76 0 h20 m-116 0 q10 0 10 10 m96 0 q0 -10 10 -10 m-106 10 v12 m96 0 v-12 m-96 12 q0 10 10 10 m76 0 q10 0 10 -10 m-86 10 h10 m46 0 h10 m0 0 h10 m-86 -10 v20 m96 0 v-20 m-96 20 v24 m96 0 v-24 m-96 24 q0 10 10 10 m76 0 q10 0 10 -10 m-86 10 h10 m56 0 h10 m-242 -76 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m242 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-242 0 h10 m24 0 h10 m0 0 h198 m20 44 h10 m26 0 h10 m2 0 l2 0 m2 0 l2 0 m2 0 l2 0 m-395 186 l2 0 m2 0 l2 0 m2 0 l2 0 m42 0 h10 m92 0 h10 m-132 0 h20 m112 0 h20 m-152 0 q10 0 10 10 m132 0 q0 -10 10 -10 m-142 10 v24 m132 0 v-24 m-132 24 q0 10 10 10 m112 0 q10 0 10 -10 m-122 10 h10 m82 0 h10 m0 0 h10 m20 -44 h10 m26 0 h10 m20 0 h10 m106 0 h10 m-146 0 l20 0 m-1 0 q-9 0 -9 -10 l0 -24 q0 -10 10 -10 m126 44 l20 0 m-20 0 q10 0 10 -10 l0 -24 q0 -10 -10 -10 m-126 0 h10 m24 0 h10 m0 0 h82 m20 44 h10 m26 0 h10 m-430 0 h20 m410 0 h20 m-450 0 q10 0 10 10 m430 0 q0 -10 10 -10 m-440 10 v58 m430 0 v-58 m-430 58 q0 10 10 10 m410 0 q10 0 10 -10 m-420 10 h10 m0 0 h400 m23 -78 h-3"></path>
<polygon points="735 377 743 373 743 381"></polygon>
<polygon points="735 377 727 373 727 381"></polygon>
</svg>
8 changes: 7 additions & 1 deletion generate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,13 @@ func main() {
{name: "col_qual_list", stmt: "col_qual_list", inline: []string{"col_qualification", "col_qualification_elem"}, replace: map[string]string{"| 'REFERENCES' qualified_name opt_name_parens": ""}},
{name: "commit_transaction", stmt: "transaction_stmt", inline: []string{"opt_transaction"}, match: regexp.MustCompile("'COMMIT'")},
{name: "create_database_stmt", inline: []string{"opt_encoding_clause"}, replace: map[string]string{"'SCONST'": "encoding"}},
{name: "create_index_stmt", inline: []string{"opt_storing", "storing", "opt_unique", "opt_name", "index_params", "index_elem", "opt_asc_desc", "name_list"}},
{name: "create_index_stmt", inline: []string{"opt_storing", "storing", "opt_unique", "opt_name", "index_params", "index_elem", "opt_asc_desc", "name_list"}, replace: map[string]string{
"'INDEX' ( name": "'INDEX' ( index_name",
"'EXISTS' name": "'EXISTS' index_name",
"qualified_name": "table_name",
"',' name": "',' column_name",
"( name (": "( column_name (",
}},
{name: "create_table_stmt", inline: []string{"opt_table_elem_list", "table_elem_list", "table_elem"}},
{name: "delete_stmt", inline: []string{"relation_expr_opt_alias", "where_clause", "returning_clause", "target_list", "target_elem"}},
{name: "drop_database", stmt: "drop_stmt", match: regexp.MustCompile("'DROP' 'DATABASE'")},
Expand Down

0 comments on commit 48bdb70

Please sign in to comment.