Skip to content

Interface to call stored procedure with various parameters and their attributes need to be supported in DBI #29

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

Open
RajendraPingte opened this issue Oct 26, 2016 · 2 comments

Comments

@RajendraPingte
Copy link

DBI specification had dbCallProc procedure but has been deprecated. ROracle added its own custom method to call PLSQL stored procedures in version 1.3-1. One can provide input, output or input and output arguments to stored procedure. There is not way to specify it in DBI. There is no dbBind functionality to specify that the value should be bound as a BLOB or some other data type in the DB.
We have added oracle-specific attributes like the following:
name <- attr(obj, "ora.parameter_name") # Used to bind using name instead of position
mode <- attr(obj, "ora.parameter_mode") # this where one specifies IN/OUT or INOUT arguments
typ <- attr(col, "ora.type") # data types(blob/bfile/date/raw/char/cursor...)
enc <- attr(col, "ora.encoding") # UTF8 or something encoded data in
mxl <- attr(col, "ora.maxlength") # Maximum length of IN/OUT arguemnst or bind variable

I am attaching a document describing PLSQL procedures and its usage in Oracle:
Parameter_to_SP.pdf

It would be good to add dbBind and/or dbCallProc.

I had discussed this with Hadley Wickham and he suggested that I implement oracleProc for now.

@hadley
Copy link
Member

hadley commented Dec 4, 2017

Before we can tackle this in DBI we need a survey of stored procedure APIs across the major databases (mysql, postgres, sqlite, oracle, sql server).

@krlmlr
Copy link
Member

krlmlr commented Dec 27, 2020

I suspect most SQL databases offer an SQL way to execute a stored procedure, so that it can be called via dbExecute().

@krlmlr krlmlr closed this as completed Dec 27, 2020
@krlmlr krlmlr transferred this issue from r-dbi/DBI Nov 1, 2021
@krlmlr krlmlr reopened this Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants