Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-22.2: docgen: update BEGIN and SET TRANSACTION diagrams without iso level #137434

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions docs/generated/sql/bnf/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -68,7 +68,6 @@ FILES = [
"alter_zone_table_stmt",
"analyze_stmt",
"backup",
"begin_stmt",
"begin_transaction",
"cancel_all_jobs_stmt",
"cancel_job",
@@ -153,6 +152,7 @@ FILES = [
"like_table_option_list",
"limit_clause",
"move_cursor_stmt",
"nonpreparable_set_stmt",
"not_null_column_level",
"offset_clause",
"on_conflict",
@@ -206,7 +206,6 @@ FILES = [
"set_rest_more",
"set_session_stmt",
"set_transaction",
"set_transaction_stmt",
"show_backup",
"show_cluster_setting",
"show_columns_stmt",
1 change: 0 additions & 1 deletion docs/generated/sql/bnf/begin_stmt.bnf

This file was deleted.

19 changes: 18 additions & 1 deletion docs/generated/sql/bnf/legacy_begin_stmt.bnf
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
legacy_begin_stmt ::=
'BEGIN' opt_transaction begin_transaction
'BEGIN' 'TRANSACTION' 'PRIORITY' 'LOW' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'TRANSACTION' 'PRIORITY' 'NORMAL' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'TRANSACTION' 'PRIORITY' 'HIGH' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'TRANSACTION' 'READ' 'ONLY' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'TRANSACTION' 'READ' 'WRITE' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'TRANSACTION' 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'TRANSACTION' 'DEFERRABLE' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'TRANSACTION' 'NOT' 'DEFERRABLE' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'TRANSACTION'
| 'BEGIN' 'PRIORITY' 'LOW' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'PRIORITY' 'NORMAL' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'PRIORITY' 'HIGH' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'READ' 'ONLY' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'READ' 'WRITE' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'DEFERRABLE' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN' 'NOT' 'DEFERRABLE' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'BEGIN'
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
2 changes: 1 addition & 1 deletion docs/generated/sql/bnf/set_transaction.bnf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nonpreparable_set_stmt ::=
set_transaction_stmt ::=
'SET' 'TRANSACTION' 'PRIORITY' 'LOW' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'SET' 'TRANSACTION' 'PRIORITY' 'NORMAL' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
| 'SET' 'TRANSACTION' 'PRIORITY' 'HIGH' ( ( ( ',' | ) ( ( 'PRIORITY' ( 'LOW' | 'NORMAL' | 'HIGH' ) ) | ( 'READ' 'ONLY' | 'READ' 'WRITE' ) | ( 'AS' 'OF' 'SYSTEM' 'TIME' a_expr ) | ( 'DEFERRABLE' | 'NOT' 'DEFERRABLE' ) ) ) )*
3 changes: 0 additions & 3 deletions docs/generated/sql/bnf/set_transaction_stmt.bnf

This file was deleted.

8 changes: 3 additions & 5 deletions pkg/cmd/docgen/diagrams.go
Original file line number Diff line number Diff line change
@@ -615,7 +615,7 @@ var specs = []stmtSpec{
exclude: []*regexp.Regexp{regexp.MustCompile("'IN'")},
},
{
name: "begin_stmt",
name: "legacy_begin_stmt",
inline: []string{
"opt_transaction",
"begin_transaction",
@@ -628,9 +628,7 @@ var specs = []stmtSpec{
"transaction_read_mode",
"as_of_clause",
"transaction_deferrable_mode",
},
exclude: []*regexp.Regexp{
regexp.MustCompile("'START'"),
"user_priority",
},
},
{
@@ -1320,7 +1318,7 @@ var specs = []stmtSpec{
},
{
name: "set_transaction",
stmt: "nonpreparable_set_stmt",
stmt: "set_transaction_stmt",
inline: []string{
"set_transaction_stmt",
"transaction_mode",
3 changes: 1 addition & 2 deletions pkg/gen/bnf.bzl
Original file line number Diff line number Diff line change
@@ -68,7 +68,6 @@ BNF_SRCS = [
"//docs/generated/sql/bnf:alter_zone_table_stmt.bnf",
"//docs/generated/sql/bnf:analyze_stmt.bnf",
"//docs/generated/sql/bnf:backup.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",
@@ -153,6 +152,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",
@@ -206,7 +206,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",
2 changes: 1 addition & 1 deletion pkg/gen/diagrams.bzl
Original file line number Diff line number Diff line change
@@ -68,7 +68,6 @@ DIAGRAMS_SRCS = [
"//docs/generated/sql/bnf:alter_zone_table.html",
"//docs/generated/sql/bnf:analyze.html",
"//docs/generated/sql/bnf:backup.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",
@@ -153,6 +152,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",
3 changes: 1 addition & 2 deletions pkg/gen/docs.bzl
Original file line number Diff line number Diff line change
@@ -80,7 +80,6 @@ DOCS_SRCS = [
"//docs/generated/sql/bnf:alter_zone_table_stmt.bnf",
"//docs/generated/sql/bnf:analyze_stmt.bnf",
"//docs/generated/sql/bnf:backup.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",
@@ -165,6 +164,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",
@@ -218,7 +218,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",