Skip to content

Commit ee92ede

Browse files
committed
docgen: expose WITH/WITHOUT HOLD syntax in SQL cursor diagram
1 parent c015076 commit ee92ede

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
declare_cursor_stmt ::=
2-
'DECLARE' cursor_name opt_binary opt_sensitivity opt_scroll 'CURSOR' opt_hold 'FOR' select_stmt
2+
'DECLARE' cursor_name opt_binary opt_sensitivity opt_scroll 'CURSOR' 'WITH' 'HOLD' 'FOR' select_stmt
3+
| 'DECLARE' cursor_name opt_binary opt_sensitivity opt_scroll 'CURSOR' 'WITHOUT' 'HOLD' 'FOR' select_stmt
4+
| 'DECLARE' cursor_name opt_binary opt_sensitivity opt_scroll 'CURSOR' 'FOR' select_stmt

pkg/cmd/docgen/diagrams.go

+4
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,10 @@ var specs = []stmtSpec{
914914
"string_or_placeholder 'PASSWORD'": "name 'PASSWORD'",
915915
"'PASSWORD' string_or_placeholder": "'PASSWORD' password"},
916916
},
917+
{
918+
name: "declare_cursor_stmt",
919+
inline: []string{"opt_hold"},
920+
},
917921
{
918922
name: "default_value_column_level",
919923
stmt: "stmt_block",

0 commit comments

Comments
 (0)