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

docgen: update SQL diagrams for SQL docs refactor #95591

Merged
merged 1 commit into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions docs/generated/sql/bnf/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ FILES = [
"alter_backup",
"alter_backup_schedule",
"alter_column",
"alter_database",
"alter_database_add_region_stmt",
"alter_database_add_super_region",
"alter_database_set_secondary_region_stmt",
Expand All @@ -16,8 +17,10 @@ FILES = [
"alter_database_drop_region",
"alter_database_drop_secondary_region",
"alter_database_owner",
"alter_database_placement_stmt",
"alter_database_primary_region",
"alter_database_set_zone_config_extension_stmt",
"alter_database_set_stmt",
"alter_database_stmt",
"alter_database_survival_goal_stmt",
"alter_database_to_schema_stmt",
Expand All @@ -30,11 +33,13 @@ FILES = [
"alter_func_set_schema_stmt",
"alter_func_dep_extension_stmt",
"alter_index_partition_by",
"alter_index",
"alter_index_stmt",
"alter_index_visible_stmt",
"alter_partition_stmt",
"alter_primary_key",
"alter_range_relocate_stmt",
"alter_range",
"alter_range_stmt",
"alter_rename_view_stmt",
"alter_role_stmt",
Expand All @@ -47,6 +52,7 @@ FILES = [
"alter_sequence_set_schema_stmt",
"alter_stmt",
"alter_table",
"alter_table_cmds",
"alter_table_locality_stmt",
"alter_table_owner_stmt",
"alter_table_partition_by",
Expand Down
41 changes: 41 additions & 0 deletions docs/generated/sql/bnf/alter_database.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
alter_database_stmt ::=
'ALTER' 'DATABASE' database_name 'RENAME' 'TO' database_new_name
| 'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'DATABASE' database_name 'OWNER' 'TO' role_spec
| 'ALTER' 'DATABASE' database_name 'CONVERT' 'TO' 'SCHEMA' 'WITH' 'PARENT' database_name
| 'ALTER' 'DATABASE' database_name 'ADD' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'ADD' 'REGION' 'IF' 'NOT' 'EXISTS' region_name
| 'ALTER' 'DATABASE' database_name 'DROP' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'DROP' 'REGION' 'IF' 'EXISTS' region_name
| 'ALTER' 'DATABASE' database_name 'SURVIVE' '=' 'REGION' 'FAILURE'
| 'ALTER' 'DATABASE' database_name 'SURVIVE' 'REGION' 'FAILURE'
| 'ALTER' 'DATABASE' database_name 'SURVIVE' '=' 'ZONE' 'FAILURE'
| 'ALTER' 'DATABASE' database_name 'SURVIVE' 'ZONE' 'FAILURE'
| 'ALTER' 'DATABASE' database_name 'PRIMARY' 'REGION' '=' region_name
| 'ALTER' 'DATABASE' database_name 'PRIMARY' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'SET' 'PRIMARY' 'REGION' '=' region_name
| 'ALTER' 'DATABASE' database_name 'SET' 'PRIMARY' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'PLACEMENT' 'RESTRICTED'
| 'ALTER' 'DATABASE' database_name 'PLACEMENT' 'DEFAULT'
| 'ALTER' 'DATABASE' database_name 'SET' variable '=' value ( ( ',' value ) )*
| 'ALTER' 'DATABASE' database_name 'SET' variable 'TO' value ( ( ',' value ) )*
| 'ALTER' 'DATABASE' database_name 'RESET_ALL' 'ALL'
| 'ALTER' 'DATABASE' database_name 'RESET' session_var
| 'ALTER' 'DATABASE' database_name 'ADD' 'SUPER' 'REGION' region_name 'VALUES' region_name_list
| 'ALTER' 'DATABASE' database_name 'ALTER' 'SUPER' 'REGION' region_name 'VALUES' region_name_list
| 'ALTER' 'DATABASE' database_name 'DROP' 'SUPER' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'SET' 'SECONDARY' 'REGION' '=' region_name
| 'ALTER' 'DATABASE' database_name 'SET' 'SECONDARY' 'REGION' region_name
| 'ALTER' 'DATABASE' database_name 'DROP' 'SECONDARY' 'REGION'
| 'ALTER' 'DATABASE' database_name 'DROP' 'SECONDARY' 'REGION' 'IF' 'EXISTS'
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'GLOBAL' 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'GLOBAL' 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'GLOBAL' 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'IN' region_name 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'IN' region_name 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'DATABASE' database_name 'ALTER' 'LOCALITY' 'REGIONAL' 'IN' region_name 'CONFIGURE' 'ZONE' 'DISCARD'
2 changes: 2 additions & 0 deletions docs/generated/sql/bnf/alter_database_placement_stmt.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter_database_placement_stmt ::=
'ALTER' 'DATABASE' database_name placement_clause
2 changes: 2 additions & 0 deletions docs/generated/sql/bnf/alter_database_set_stmt.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alter_database_set_stmt ::=
'ALTER' 'DATABASE' database_name set_or_reset_clause
2 changes: 2 additions & 0 deletions docs/generated/sql/bnf/alter_database_stmt.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ alter_database_stmt ::=
| alter_database_drop_region_stmt
| alter_database_survival_goal_stmt
| alter_database_primary_region_stmt
| alter_database_placement_stmt
| alter_database_set_stmt
| alter_database_add_super_region
| alter_database_alter_super_region
| alter_database_drop_super_region
Expand Down
2 changes: 1 addition & 1 deletion docs/generated/sql/bnf/alter_func_stmt.bnf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
alter_func_stmt ::=
( 'ALTER' 'FUNCTION' function_with_paramtypes ( ( ( 'CALLED' 'ON' 'NULL' 'INPUT' | 'RETURNS' 'NULL' 'ON' 'NULL' 'INPUT' | 'STRICT' | 'IMMUTABLE' | 'STABLE' | 'VOLATILE' | 'LEAKPROOF' | 'NOT' 'LEAKPROOF' ) ) ( ( ( 'CALLED' 'ON' 'NULL' 'INPUT' | 'RETURNS' 'NULL' 'ON' 'NULL' 'INPUT' | 'STRICT' | 'IMMUTABLE' | 'STABLE' | 'VOLATILE' | 'LEAKPROOF' | 'NOT' 'LEAKPROOF' ) ) )* ) ( 'RESTRICT' | ) )
| ( 'ALTER' 'FUNCTION' function_with_paramtypes 'RENAME' 'TO' name )
| ( 'ALTER' 'FUNCTION' function_with_paramtypes 'RENAME' 'TO' function_new_name )
| ( 'ALTER' 'FUNCTION' function_with_paramtypes 'OWNER' 'TO' role_spec )
| ( 'ALTER' 'FUNCTION' function_with_paramtypes 'SET' 'SCHEMA' schema_name )
| ( 'ALTER' 'FUNCTION' function_with_paramtypes ( 'NO' | ) 'DEPENDS' 'ON' 'EXTENSION' name )
43 changes: 43 additions & 0 deletions docs/generated/sql/bnf/alter_index.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
alter_index_stmt ::=
'ALTER' 'INDEX' table_name '@' index_name 'PARTITION' 'BY' 'LIST' '(' name_list ')' '(' list_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' table_name '@' index_name 'PARTITION' 'BY' 'RANGE' '(' name_list ')' '(' range_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' table_name '@' index_name 'PARTITION' 'BY' 'NOTHING' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' index_name 'PARTITION' 'BY' 'LIST' '(' name_list ')' '(' list_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' index_name 'PARTITION' 'BY' 'RANGE' '(' name_list ')' '(' range_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' index_name 'PARTITION' 'BY' 'NOTHING' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'PARTITION' 'BY' 'LIST' '(' name_list ')' '(' list_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'PARTITION' 'BY' 'RANGE' '(' name_list ')' '(' range_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'PARTITION' 'BY' 'NOTHING' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'PARTITION' 'BY' 'LIST' '(' name_list ')' '(' list_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'PARTITION' 'BY' 'RANGE' '(' name_list ')' '(' range_partitions ')' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'PARTITION' 'BY' 'NOTHING' ( ( ',' ( ( ( 'PARTITION' 'BY' ( 'LIST' '(' name_list ')' '(' list_partitions ')' | 'RANGE' '(' name_list ')' '(' range_partitions ')' | 'NOTHING' ) ) ) ) ) )*
| 'ALTER' 'INDEX' table_name '@' index_name 'SPLIT' 'AT' select_stmt
| 'ALTER' 'INDEX' index_name 'SPLIT' 'AT' select_stmt
| 'ALTER' 'INDEX' table_name '@' index_name 'SPLIT' 'AT' select_stmt 'WITH' 'EXPIRATION' a_expr
| 'ALTER' 'INDEX' index_name 'SPLIT' 'AT' select_stmt 'WITH' 'EXPIRATION' a_expr
| 'ALTER' 'INDEX' table_name '@' index_name 'UNSPLIT' 'AT' select_stmt
| 'ALTER' 'INDEX' index_name 'UNSPLIT' 'AT' select_stmt
| 'ALTER' 'INDEX' table_name '@' index_name 'UNSPLIT' 'ALL'
| 'ALTER' 'INDEX' index_name 'UNSPLIT' 'ALL'
| 'ALTER' 'INDEX' table_name '@' index_name 'RENAME' 'TO' index_new_name
| 'ALTER' 'INDEX' index_name 'RENAME' 'TO' index_new_name
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'RENAME' 'TO' index_new_name
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'RENAME' 'TO' index_new_name
| 'ALTER' 'INDEX' table_name '@' index_name 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'INDEX' table_name '@' index_name 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'INDEX' table_name '@' index_name 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'INDEX' index_name 'CONFIGURE' 'ZONE' 'USING' variable '=' 'COPY' 'FROM' 'PARENT' ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'INDEX' index_name 'CONFIGURE' 'ZONE' 'USING' variable '=' value ( ( ',' variable '=' value | ',' variable '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'INDEX' index_name 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'INDEX' table_name '@' index_name 'NOT' 'VISIBLE'
| 'ALTER' 'INDEX' table_name '@' index_name 'INVISIBLE'
| 'ALTER' 'INDEX' table_name '@' index_name 'VISIBLE'
| 'ALTER' 'INDEX' index_name 'NOT' 'VISIBLE'
| 'ALTER' 'INDEX' index_name 'INVISIBLE'
| 'ALTER' 'INDEX' index_name 'VISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'NOT' 'VISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'INVISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' table_name '@' index_name 'VISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'NOT' 'VISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'INVISIBLE'
| 'ALTER' 'INDEX' 'IF' 'EXISTS' index_name 'VISIBLE'
12 changes: 12 additions & 0 deletions docs/generated/sql/bnf/alter_range.bnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
alter_range_stmt ::=
'ALTER' 'RANGE' range_id 'CONFIGURE' 'ZONE' 'USING' var_name '=' 'COPY' 'FROM' 'PARENT' ( ( ',' var_name '=' var_value | ',' var_name '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'RANGE' range_id 'CONFIGURE' 'ZONE' 'USING' var_name '=' var_value ( ( ',' var_name '=' var_value | ',' var_name '=' 'COPY' 'FROM' 'PARENT' ) )*
| 'ALTER' 'RANGE' range_id 'CONFIGURE' 'ZONE' 'DISCARD'
| 'ALTER' 'RANGE' 'RELOCATE' 'LEASE' 'TO' a_expr 'FOR' select_stmt
| 'ALTER' 'RANGE' range_id 'RELOCATE' 'LEASE' 'TO' a_expr
| 'ALTER' 'RANGE' 'RELOCATE' 'VOTERS' 'FROM' a_expr 'TO' a_expr 'FOR' select_stmt
| 'ALTER' 'RANGE' 'RELOCATE' 'FROM' a_expr 'TO' a_expr 'FOR' select_stmt
| 'ALTER' 'RANGE' 'RELOCATE' 'NONVOTERS' 'FROM' a_expr 'TO' a_expr 'FOR' select_stmt
| 'ALTER' 'RANGE' range_id 'RELOCATE' 'VOTERS' 'FROM' a_expr 'TO' a_expr
| 'ALTER' 'RANGE' range_id 'RELOCATE' 'FROM' a_expr 'TO' a_expr
| 'ALTER' 'RANGE' range_id 'RELOCATE' 'NONVOTERS' 'FROM' a_expr 'TO' a_expr
2 changes: 1 addition & 1 deletion docs/generated/sql/bnf/alter_schema.bnf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
alter_schema_stmt ::=
'ALTER' 'SCHEMA' ( name | name '.' name ) 'RENAME' 'TO' schema_name
'ALTER' 'SCHEMA' ( name | name '.' name ) 'RENAME' 'TO' schema_new_name
| 'ALTER' 'SCHEMA' ( name | name '.' name ) 'OWNER' 'TO' role_spec
Loading