demo: add alter_job entry showing name without _stmt suffix#46
Open
ebembi-crdb wants to merge 4 commits into
Open
demo: add alter_job entry showing name without _stmt suffix#46ebembi-crdb wants to merge 4 commits into
ebembi-crdb wants to merge 4 commits into
Conversation
This demonstrates the _stmt suffix handling: - Name ends with _stmt - Points to existing grammar rule show_csettings_stmt - Automation will create show_system_info.html (no _stmt)
Demonstrates Ryan's described scenario: diagrams.go uses name: "alter_job"
(no _stmt suffix) with stmt: "alter_job_stmt" (the grammar rule name).
The BZL files previously had "alter_job_stmt" entries; they are renamed
here to "alter_job" to match what docgen generates as the output filename.
This is the rename-not-add pattern the automation must apply.
- diagrams.go: new stmtSpec{name: "alter_job", stmt: "alter_job_stmt"}
- BUILD.bazel: "alter_job_stmt" → "alter_job" in FILES list
- bnf.bzl: alter_job_stmt.bnf → alter_job.bnf
- docs.bzl: alter_job_stmt.bnf → alter_job.bnf
- diagrams.bzl: no change needed (svg genrule already strips _stmt,
so alter_job.html was already present)
Release note: None
SQL Diagram Generation Report✔️ No diagram changes detected This comment was generated by the SQL Diagram CI workflow. |
SQL Diagram Generation Report✔️ No diagram changes detected This comment was generated by the SQL Diagram CI workflow. |
SQL Diagram Generation Report✅ Validation Passed 🔄 Diagram changes detected SKIP DOC Warnings (click to expand)The following grammar rules are suppressed from documentation: This comment was generated by the SQL Diagram CI workflow. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this demonstrates
The correct
_stmtsuffix scenario:name: "alter_job"— no_stmtsuffix; this becomes the BNF/HTML filenamestmt: "alter_job_stmt"— the grammar rule name insql.yThe BZL files previously had
alter_job_stmtentries (the pre-existing state before this diagrams.go entry was added). This PR renames them toalter_job— not adds a second entry alongside them.diagrams.gostmtSpec{name: "alter_job", stmt: "alter_job_stmt"}BUILD.bazel"alter_job_stmt"→"alter_job"inFILESbnf.bzlalter_job_stmt.bnf→alter_job.bnfdocs.bzlalter_job_stmt.bnf→alter_job.bnfdiagrams.bzl_stmt, soalter_job.htmlwas already present