Skip to content

Commit

Permalink
docgen: update COPY TO STDOUT portions of SQL diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
taroface committed Jan 16, 2025
1 parent 478a498 commit fdae391
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
18 changes: 9 additions & 9 deletions docs/generated/sql/bnf/copy_stmt.bnf
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
copy_stmt ::=
'COPY' table_name opt_column_list 'FROM' 'STDIN' 'WITH' copy_options ( ( copy_options ) )*
| 'COPY' table_name opt_column_list 'FROM' 'STDIN' copy_options ( ( copy_options ) )*
| 'COPY' table_name opt_column_list 'FROM' 'STDIN' 'WITH' '(' copy_generic_options_list ')'
| 'COPY' table_name opt_column_list 'FROM' 'STDIN' '(' copy_generic_options_list ')'
| 'COPY' table_name opt_column_list 'FROM' 'STDIN' 'WITH'
| 'COPY' table_name opt_column_list 'FROM' 'STDIN'
| 'COPY' table_name opt_column_list 'FROM' 'STDIN'
| 'COPY' table_name opt_column_list 'TO' 'STDOUT' 'WITH' copy_options ( ( copy_options ) )*
| 'COPY' table_name opt_column_list 'TO' 'STDOUT' copy_options ( ( copy_options ) )*
| 'COPY' table_name opt_column_list 'TO' 'STDOUT' 'WITH' '(' copy_generic_options_list ')'
| 'COPY' table_name opt_column_list 'TO' 'STDOUT' '(' copy_generic_options_list ')'
| 'COPY' table_name opt_column_list 'TO' 'STDOUT' 'WITH'
| 'COPY' table_name opt_column_list 'TO' 'STDOUT'
| 'COPY' table_name opt_column_list 'TO' 'STDOUT'
| 'COPY' '(' copy_to_stmt ')' 'TO' 'STDOUT' 'WITH' copy_options ( ( copy_options ) )*
| 'COPY' '(' copy_to_stmt ')' 'TO' 'STDOUT' copy_options ( ( copy_options ) )*
| 'COPY' '(' copy_to_stmt ')' 'TO' 'STDOUT' 'WITH' '(' copy_generic_options_list ')'
| 'COPY' '(' copy_to_stmt ')' 'TO' 'STDOUT' '(' copy_generic_options_list ')'
| 'COPY' '(' copy_to_stmt ')' 'TO' 'STDOUT'
| 'COPY' '(' query ')' 'TO' 'STDOUT' 'WITH' copy_options ( ( copy_options ) )*
| 'COPY' '(' query ')' 'TO' 'STDOUT' copy_options ( ( copy_options ) )*
| 'COPY' '(' query ')' 'TO' 'STDOUT' 'WITH'
| 'COPY' '(' query ')' 'TO' 'STDOUT'
| 'COPY' '(' query ')' 'TO' 'STDOUT'
8 changes: 6 additions & 2 deletions pkg/cmd/docgen/diagrams.go
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,12 @@ var specs = []stmtSpec{
match: []*regexp.Regexp{regexp.MustCompile("'COMMIT'|'END'")},
},
{
name: "copy_stmt",
inline: []string{"opt_with_copy_options", "copy_options_list", "opt_with", "opt_where_clause", "where_clause"},
name: "copy_stmt",
inline: []string{"opt_with_copy_options", "copy_options_list", "opt_with", "opt_where_clause", "where_clause"},
replace: map[string]string{
"copy_to_stmt": "query",
"'(' copy_generic_options_list ')'": "",
},
exclude: []*regexp.Regexp{regexp.MustCompile("'WHERE'")},
},
{
Expand Down

0 comments on commit fdae391

Please sign in to comment.