Named Queries auto-generate in script
planned
J
Joeri In den Kleef
It would be very nice if you could select a named query in a script. Just like you select a property. When you selected and fill in some information the script with all the parameters will write for you. The params will be copied from the named query and will use the same name for the variable in the script.
Log In
P
Paul Griffith
Merged in a post:
Named Query Copy Parameters Button
M
Matthew Gaitan
Can a button be added to the Named Query Designer that allows the copying of all of the parameters a Named Query accepts in a JSON format that will be usable as the 'parameters' argument to the system.db.runNamedQuery() function
P
Paul Griffith
planned
P
Paul Griffith
We have a somewhat similar idea already percolating internally - an "choose named query" selector (similar to the property/tag/etc helpers already present in many scripting areas) that would automatically insert a call to
system.db.runNamedQuery
and a dictionary construction script placeholder. Do you think that would cover this functionality?M
Matthew Gaitan
Paul Griffith: Yes! that sounds even better than what I envisioned :D
S
Stevenson Yuan
Paul Griffith project level scripts would also need to have this support (an area that doesn't currently have helper buttons).
A
Alex Marks
This would be nice, but may be difficult to implement. A simpler solution might be a right-click option for an existing named query like "Generate Scripting Call" that would auto-generate and copy to the clipboard the system.db.runNamedQuery() call with the name and parameter dictionary pre-filled.
L
Luca Mori
Alex Marks: That would be really nice. Even just something that you can right click your query, click on "Copy as template" for example, then if you copy it in a script page it would generate a dictionary filled with the custom query parameters and a call to the relative query.