Skip to content

Commit

Permalink
docgen: update BEGIN and SET TRANSACTION diagrams without iso level
Browse files Browse the repository at this point in the history
  • Loading branch information
taroface committed Dec 13, 2024
1 parent 76b37d7 commit 7802e4b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 16 deletions.
3 changes: 1 addition & 2 deletions docs/generated/sql/bnf/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ FILES = [
"analyze_stmt",
"backup",
"backup_options",
"begin_stmt",
"begin_transaction",
"cancel_all_jobs_stmt",
"cancel_job",
Expand Down Expand Up @@ -156,6 +155,7 @@ FILES = [
"like_table_option_list",
"limit_clause",
"move_cursor_stmt",
"nonpreparable_set_stmt",
"not_null_column_level",
"offset_clause",
"on_conflict",
Expand Down Expand Up @@ -210,7 +210,6 @@ FILES = [
"set_rest_more",
"set_session_stmt",
"set_transaction",
"set_transaction_stmt",
"show_backup",
"show_cluster_setting",
"show_columns_stmt",
Expand Down
2 changes: 2 additions & 0 deletions docs/generated/sql/bnf/nonpreparable_set_stmt.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nonpreparable_set_stmt ::=
set_transaction_stmt
13 changes: 4 additions & 9 deletions pkg/cmd/docgen/diagrams.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,24 +614,19 @@ var specs = []stmtSpec{
exclude: []*regexp.Regexp{regexp.MustCompile("'IN'")},
},
{
name: "begin_stmt",
name: "legacy_begin_stmt",
inline: []string{
"opt_transaction",
"begin_transaction",
"transaction_mode",
"transaction_user_priority",
"user_priority",
"iso_level",
"transaction_mode_list",
"opt_comma",
"transaction_mode",
"transaction_user_priority",
"transaction_read_mode",
"as_of_clause",
"transaction_deferrable_mode",
"user_priority",
},
exclude: []*regexp.Regexp{
regexp.MustCompile("'START'"),
},
},
{
name: "check_column_level",
Expand Down Expand Up @@ -1330,7 +1325,7 @@ var specs = []stmtSpec{
},
{
name: "set_transaction",
stmt: "nonpreparable_set_stmt",
stmt: "set_transaction_stmt",
inline: []string{
"set_transaction_stmt",
"transaction_mode",
Expand Down
3 changes: 1 addition & 2 deletions pkg/gen/bnf.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ BNF_SRCS = [
"//docs/generated/sql/bnf:analyze_stmt.bnf",
"//docs/generated/sql/bnf:backup.bnf",
"//docs/generated/sql/bnf:backup_options.bnf",
"//docs/generated/sql/bnf:begin_stmt.bnf",
"//docs/generated/sql/bnf:begin_transaction.bnf",
"//docs/generated/sql/bnf:cancel_all_jobs_stmt.bnf",
"//docs/generated/sql/bnf:cancel_job.bnf",
Expand Down Expand Up @@ -156,6 +155,7 @@ BNF_SRCS = [
"//docs/generated/sql/bnf:like_table_option_list.bnf",
"//docs/generated/sql/bnf:limit_clause.bnf",
"//docs/generated/sql/bnf:move_cursor_stmt.bnf",
"//docs/generated/sql/bnf:nonpreparable_set_stmt.bnf",
"//docs/generated/sql/bnf:not_null_column_level.bnf",
"//docs/generated/sql/bnf:offset_clause.bnf",
"//docs/generated/sql/bnf:on_conflict.bnf",
Expand Down Expand Up @@ -210,7 +210,6 @@ BNF_SRCS = [
"//docs/generated/sql/bnf:set_rest_more.bnf",
"//docs/generated/sql/bnf:set_session_stmt.bnf",
"//docs/generated/sql/bnf:set_transaction.bnf",
"//docs/generated/sql/bnf:set_transaction_stmt.bnf",
"//docs/generated/sql/bnf:show_backup.bnf",
"//docs/generated/sql/bnf:show_cluster_setting.bnf",
"//docs/generated/sql/bnf:show_columns_stmt.bnf",
Expand Down
2 changes: 1 addition & 1 deletion pkg/gen/diagrams.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ DIAGRAMS_SRCS = [
"//docs/generated/sql/bnf:analyze.html",
"//docs/generated/sql/bnf:backup.html",
"//docs/generated/sql/bnf:backup_options.html",
"//docs/generated/sql/bnf:begin.html",
"//docs/generated/sql/bnf:begin_transaction.html",
"//docs/generated/sql/bnf:cancel.html",
"//docs/generated/sql/bnf:cancel_all_jobs.html",
Expand Down Expand Up @@ -156,6 +155,7 @@ DIAGRAMS_SRCS = [
"//docs/generated/sql/bnf:like_table_option_list.html",
"//docs/generated/sql/bnf:limit_clause.html",
"//docs/generated/sql/bnf:move_cursor.html",
"//docs/generated/sql/bnf:nonpreparable_set.html",
"//docs/generated/sql/bnf:not_null_column_level.html",
"//docs/generated/sql/bnf:offset_clause.html",
"//docs/generated/sql/bnf:on_conflict.html",
Expand Down
3 changes: 1 addition & 2 deletions pkg/gen/docs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ DOCS_SRCS = [
"//docs/generated/sql/bnf:analyze_stmt.bnf",
"//docs/generated/sql/bnf:backup.bnf",
"//docs/generated/sql/bnf:backup_options.bnf",
"//docs/generated/sql/bnf:begin_stmt.bnf",
"//docs/generated/sql/bnf:begin_transaction.bnf",
"//docs/generated/sql/bnf:cancel_all_jobs_stmt.bnf",
"//docs/generated/sql/bnf:cancel_job.bnf",
Expand Down Expand Up @@ -168,6 +167,7 @@ DOCS_SRCS = [
"//docs/generated/sql/bnf:like_table_option_list.bnf",
"//docs/generated/sql/bnf:limit_clause.bnf",
"//docs/generated/sql/bnf:move_cursor_stmt.bnf",
"//docs/generated/sql/bnf:nonpreparable_set_stmt.bnf",
"//docs/generated/sql/bnf:not_null_column_level.bnf",
"//docs/generated/sql/bnf:offset_clause.bnf",
"//docs/generated/sql/bnf:on_conflict.bnf",
Expand Down Expand Up @@ -222,7 +222,6 @@ DOCS_SRCS = [
"//docs/generated/sql/bnf:set_rest_more.bnf",
"//docs/generated/sql/bnf:set_session_stmt.bnf",
"//docs/generated/sql/bnf:set_transaction.bnf",
"//docs/generated/sql/bnf:set_transaction_stmt.bnf",
"//docs/generated/sql/bnf:show_backup.bnf",
"//docs/generated/sql/bnf:show_cluster_setting.bnf",
"//docs/generated/sql/bnf:show_columns_stmt.bnf",
Expand Down

0 comments on commit 7802e4b

Please sign in to comment.