zio-sql icon indicating copy to clipboard operation
zio-sql copied to clipboard

sketch stored procedures

Open bertlebee opened this issue 3 years ago • 0 comments

A sketch of what stored procedures (and maybe table valued functions for SQL server?) might look like, essentially mandraulically adapted from FunctionDef with an adapted type tag allowing for returning tables.

This is intended as a basis for @skmuiruri to work on. @jczuchnowski would you mind casting your eyes over this to see if it's headed down the right track before he gets too involved?

Todo:

  • [ ] Make sure you can't stick a stored procedure where it doesn't belong! I haven't used them in anger so not really sure if it's legit to use them in other statements
  • [ ] Rendering - base on Function rendering
  • [ ] Add a way to actually execute the stored procedure - Functions need to be wrapped in a select, stored procedures should be able to be executed without a select (and possibly not within one?)
  • [ ] Tests - probably also based on function rendering
  • [ ] Some examples/docs on usage wouldn't go astray!

bertlebee avatar Oct 18 '22 04:10 bertlebee