Is your feature request related to a problem?
Yes. We are currently evaluating Bytebase for adoption at our organization. In our workflow, vendor-provided SQL scripts are handed over to developers who are responsible for submitting them as database changes. However, these developers should not need to modify the SQL scripts directly. They should only be able to fill in the required parameter values and submit. Without a built-in parameter detection and substitution feature, developers are forced to manually edit the SQL files before uploading, which breaks our intended workflow and introduces risk.
Describe the solution you'd like
When a SQL file is uploaded in the Plan editor, Bytebase should automatically detect parameters in the script and display an inline form where the user can fill in the required values before the change is submitted. The detection should cover the following common patterns:
Stored Procedures — parameters defined in CREATE OR ALTER PROCEDURE signatures
SSMS Template Format — placeholders like <ParameterName,DATETIME,YYYY-MM-DD>, which is the standard template syntax used in SQL Server Management Studio (SSMS)
DECLARE with template values — DECLARE @StartDate DATETIME = '<StartDate,DATETIME,YYYY-MM-DD>'
Bare parameter usage — @param references with no DECLARE block
EXEC with parameters — EXEC SP_NAME @param1, @Param2
For stored procedures, the form should also generate a copyable EXEC string with the filled-in values.
We have already implemented a working proof of concept for this feature as a local customization in our Bytebase fork and are happy to contribute it as a pull request.
Additional context
We have implemented this as a proof of concept in our Bytebase fork. The implementation consists of three files:
sqlParamDetector.ts - a pure TypeScript utility that detects parameters across all 6 scenarios
SqlParamPanel.vue - a Vue component that renders the parameter input form inline in the editor
A small diff to EditorView.vue to trigger detection on SQL upload
The changes are self-contained and do not touch any core Bytebase functionality. We are happy to contribute this as a pull request if the team is interested.
sqlParamDetector.ts.txt
EditorView.patch
SqlParamPanel.vue.txt
Is your feature request related to a problem?
Yes. We are currently evaluating Bytebase for adoption at our organization. In our workflow, vendor-provided SQL scripts are handed over to developers who are responsible for submitting them as database changes. However, these developers should not need to modify the SQL scripts directly. They should only be able to fill in the required parameter values and submit. Without a built-in parameter detection and substitution feature, developers are forced to manually edit the SQL files before uploading, which breaks our intended workflow and introduces risk.
Describe the solution you'd like
When a SQL file is uploaded in the Plan editor, Bytebase should automatically detect parameters in the script and display an inline form where the user can fill in the required values before the change is submitted. The detection should cover the following common patterns:
Stored Procedures — parameters defined in CREATE OR ALTER PROCEDURE signatures
SSMS Template Format — placeholders like <ParameterName,DATETIME,YYYY-MM-DD>, which is the standard template syntax used in SQL Server Management Studio (SSMS)
DECLARE with template values — DECLARE @StartDate DATETIME = '<StartDate,DATETIME,YYYY-MM-DD>'
Bare parameter usage — @param references with no DECLARE block
EXEC with parameters — EXEC SP_NAME @param1, @Param2
For stored procedures, the form should also generate a copyable EXEC string with the filled-in values.
We have already implemented a working proof of concept for this feature as a local customization in our Bytebase fork and are happy to contribute it as a pull request.
Additional context
We have implemented this as a proof of concept in our Bytebase fork. The implementation consists of three files:
sqlParamDetector.ts - a pure TypeScript utility that detects parameters across all 6 scenarios
SqlParamPanel.vue - a Vue component that renders the parameter input form inline in the editor
A small diff to EditorView.vue to trigger detection on SQL upload
The changes are self-contained and do not touch any core Bytebase functionality. We are happy to contribute this as a pull request if the team is interested.
sqlParamDetector.ts.txt
EditorView.patch
SqlParamPanel.vue.txt