Skip to content

Commit 33d214c

Browse files
sql: add wire DROP PROVISIONED ROLES for dispatch (#166980)
sql: add wire DROP PROVISIONED ROLES for dispatch
2 parents b5debe9 + dc65753 commit 33d214c

16 files changed

Lines changed: 804 additions & 5 deletions

docs/generated/sql/bnf/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ FILES = [
146146
"drop_func_stmt",
147147
"drop_policy_stmt",
148148
"drop_proc",
149+
"drop_provisioned_roles_stmt",
149150
"drop_index",
150151
"drop_owned_by_stmt",
151152
"drop_role_stmt",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
drop_provisioned_roles_stmt ::=
2+
'DROP' 'PROVISIONED' 'ROLES' opt_with_drop_provisioned_roles_options opt_limit_clause

docs/generated/sql/bnf/drop_stmt.bnf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ drop_stmt ::=
1111
| drop_trigger_stmt
1212
| drop_policy_stmt
1313
| drop_role_stmt
14+
| drop_provisioned_roles_stmt
1415
| drop_schedule_stmt
1516
| drop_external_connection_stmt

docs/generated/sql/bnf/stmt_block.bnf

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ delete_stmt ::=
236236
drop_stmt ::=
237237
drop_ddl_stmt
238238
| drop_role_stmt
239+
| drop_provisioned_roles_stmt
239240
| drop_schedule_stmt
240241
| drop_external_connection_stmt
241242

@@ -754,6 +755,9 @@ drop_role_stmt ::=
754755
'DROP' role_or_group_or_user role_spec_list
755756
| 'DROP' role_or_group_or_user 'IF' 'EXISTS' role_spec_list
756757

758+
drop_provisioned_roles_stmt ::=
759+
'DROP' 'PROVISIONED' 'ROLES' opt_with_drop_provisioned_roles_options opt_limit_clause
760+
757761
drop_schedule_stmt ::=
758762
'DROP' 'SCHEDULE' a_expr
759763
| 'DROP' 'SCHEDULES' select_stmt
@@ -1470,6 +1474,7 @@ unreserved_keyword ::=
14701474
| 'PROCEDURAL'
14711475
| 'PROCEDURE'
14721476
| 'PROCEDURES'
1477+
| 'PROVISIONED'
14731478
| 'PROVISIONSRC'
14741479
| 'PUBLIC'
14751480
| 'PUBLICATION'
@@ -2139,6 +2144,10 @@ drop_policy_stmt ::=
21392144
'DROP' 'POLICY' name 'ON' table_name opt_drop_behavior
21402145
| 'DROP' 'POLICY' 'IF' 'EXISTS' name 'ON' table_name opt_drop_behavior
21412146

2147+
opt_with_drop_provisioned_roles_options ::=
2148+
'WITH' drop_provisioned_roles_options_list
2149+
|
2150+
21422151
explain_option_name ::=
21432152
non_reserved_word
21442153

@@ -3098,6 +3107,9 @@ view_name_list ::=
30983107
sequence_name_list ::=
30993108
db_object_name_list
31003109

3110+
drop_provisioned_roles_options_list ::=
3111+
( drop_provisioned_roles_option ) ( ( ',' drop_provisioned_roles_option ) )*
3112+
31013113
non_reserved_word ::=
31023114
'identifier'
31033115
| unreserved_keyword
@@ -3768,6 +3780,10 @@ only_signed_fconst ::=
37683780
db_object_name_list ::=
37693781
( db_object_name ) ( ( ',' db_object_name ) )*
37703782

3783+
drop_provisioned_roles_option ::=
3784+
'SOURCE' '=' a_expr
3785+
| 'LAST' 'LOGIN' 'BEFORE' a_expr
3786+
37713787
array_subscript ::=
37723788
'[' a_expr ']'
37733789
| '[' opt_slice_bound ':' opt_slice_bound ']'
@@ -4555,6 +4571,7 @@ bare_label_keywords ::=
45554571
| 'PROCEDURAL'
45564572
| 'PROCEDURE'
45574573
| 'PROCEDURES'
4574+
| 'PROVISIONED'
45584575
| 'PROVISIONSRC'
45594576
| 'PUBLIC'
45604577
| 'PUBLICATION'

pkg/gen/bnf.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ BNF_SRCS = [
148148
"//docs/generated/sql/bnf:drop_owned_by_stmt.bnf",
149149
"//docs/generated/sql/bnf:drop_policy_stmt.bnf",
150150
"//docs/generated/sql/bnf:drop_proc.bnf",
151+
"//docs/generated/sql/bnf:drop_provisioned_roles_stmt.bnf",
151152
"//docs/generated/sql/bnf:drop_role_stmt.bnf",
152153
"//docs/generated/sql/bnf:drop_schedule_stmt.bnf",
153154
"//docs/generated/sql/bnf:drop_schema.bnf",

pkg/gen/diagrams.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ DIAGRAMS_SRCS = [
149149
"//docs/generated/sql/bnf:drop_owned_by.html",
150150
"//docs/generated/sql/bnf:drop_policy.html",
151151
"//docs/generated/sql/bnf:drop_proc.html",
152+
"//docs/generated/sql/bnf:drop_provisioned_roles.html",
152153
"//docs/generated/sql/bnf:drop_role.html",
153154
"//docs/generated/sql/bnf:drop_schedule.html",
154155
"//docs/generated/sql/bnf:drop_schema.html",

pkg/gen/docs.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ DOCS_SRCS = [
158158
"//docs/generated/sql/bnf:drop_owned_by_stmt.bnf",
159159
"//docs/generated/sql/bnf:drop_policy_stmt.bnf",
160160
"//docs/generated/sql/bnf:drop_proc.bnf",
161+
"//docs/generated/sql/bnf:drop_provisioned_roles_stmt.bnf",
161162
"//docs/generated/sql/bnf:drop_role_stmt.bnf",
162163
"//docs/generated/sql/bnf:drop_schedule_stmt.bnf",
163164
"//docs/generated/sql/bnf:drop_schema.bnf",

pkg/sql/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ go_library(
107107
"drop_external_connection.go",
108108
"drop_function.go",
109109
"drop_index.go",
110+
"drop_provisioned_roles.go",
110111
"drop_role.go",
111112
"drop_schema.go",
112113
"drop_sequence.go",
@@ -706,6 +707,7 @@ go_test(
706707
"distsql_running_test.go",
707708
"drop_function_test.go",
708709
"drop_helpers_test.go",
710+
"drop_provisioned_roles_test.go",
709711
"drop_test.go",
710712
"err_count_test.go",
711713
"event_log_test.go",

0 commit comments

Comments
 (0)