-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for parameters #78
Comments
Thank you for including all this helpful context. I hadn't seen the DBeaver implementation before, so that's a useful source of potential solutions here. I also learned that some drivers support a version of this out of the box, such as MySQL. Here are some disjoint thoughts on the problem space
One possible designParse the query for standard query substitution identifiers, |
Hmm, ok. If we avoid any preprocessing in the notebook, I'd likely need a preprocessor at my end to convert pgtyped files to sql files for notebook. Which may not be too difficult - just an extra step.
The motivation behind this is somewhat hard for me to understand. I was thinking we could save the variable values as comments in the notebook so that they are available as examples (or sensible defaults) to someone else trying out the notebook. This could be useful esp. because we can't easily reference some external data in a sql notebook. |
It would be nice to be able to have cells with parameterized expressions that can be entered by user when running the query.
In db frontends like DBeaver etc. when a SQL parameter is detected in the expression being evaluated the app shows a dialog to prompt for values.
My primary use case is to use pgtyped sql files as notebooks, which can contain parameters:
This parameter syntax is nonstandard sql but tools often allow some customization around parameter detection that enables usage of such syntax.
These values are remembered and auto populated the next time the query is executed.
Would you consider this to be within the scope of this project ?
The text was updated successfully, but these errors were encountered: