CLI support for Stored Procedures
See original GitHub issuePR #624 adds a feature for exposing Stored Procedures through REST APIs.
Links: Design Doc, RFC
A new option is required in CLI along with add
command to be able to add a stored procedure.
The config file for declaring a stored procedure looks like below.
"GetBooks": {
"source": {
"type": "stored-procedure",
"object": "get_books"
},
"rest": true,
"graphql": false,
"permissions": [
{
"role": "authenticated",
"actions": [ "*" ]
}
]
},
"GetBook": {
"source": {
"type": "stored-procedure",
"object": "get_book_by_id"
},
"rest": true,
"graphql": false,
"permissions": [
{
"role": "authenticated",
"actions": [ "*" ]
}
]
As per RFC, this is the definition for the source
field in a stored procedure
"type": {
"type": "string",
"enum": [ "table", "view", "stored-procedure" ],
"description": "Database object type"
},
"object": {
"type": "string",
"description": "Database object name"
},
"parameters": {
"type": "object",
"description": "Dictionary of parameters and their values",
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Calling stored procedures from CLI applications
The CLI driver supports calling stored procedures with parameter markers. Initialize the application variables that correspond to the IN, INOUT, and OUT ...
Read more >Command line stored procedures
Stored procedures are provided for the command line interface to obtain information about the jobs and schedules configured in the Job Scheduler database....
Read more >sql - Generating the stored procedures from command line
I want to generate Scripts i.e. Stored procedures and user defined functions from SQL server 2005. I have done it through SQL management...
Read more >Install Extended Stored Procedures (XSP) CLI Commands
SQL Safe provides you with CLI commands to help you manually install SQL Server extended stored procedures (XSP) for SQLsafe.
Read more >How to call a stored procedure from command line
I am on windows 2003 and SQL server 2000. I have a stored procedure "XYZ" which accepts input parameters "P", "Q". Can anyone...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
type
andobject
are mandatory. Thename
property is actually calledobject
in the schema. Please confirm with Davide about nomenclature.string[]
.This is dangerous, we should make sure, CLI is backward compatible. No removals after releasing. We haven’t released publicly yet so we could be fine but lets keep in mind backward compatibility.
also, i feel like we should then remove
--source
, and have only one mandatory field--source.name
. it will always take string as input.