[R-sig-DB] Add a "dbSendUpdate" function to DBI?
MacQueen, Don
m@cqueen1 @end|ng |rom ||n|@gov
Thu Sep 4 17:24:11 CEST 2014
I will defer to others on this question.
In general I want to be able to detect failures and handle them
gracefully, and this is perhaps easier if it returns a boolean, but
wrapping it in try() is also easy enough.
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 9/4/14, 6:13 AM, "Hadley Wickham" <hadley using rstudio.com> wrote:
>A thought: should dbSendUpdate() return a boolean indicating success,
>or always return TRUE, otherwise throwing an error?
>
>Hadley
>
>On Wed, Sep 3, 2014 at 3:59 PM, MacQueen, Don <macqueen1 using llnl.gov> wrote:
>> Hadley,
>>
>> Since you mentioned DBI 0.3 in a recent email, could I make a request
>>to add
>> a dbSendUpdate() function to DBI, like the one in RJDBC?
>>
>> require(RJDBC)
>>
>>> find('dbSendQuery')
>> [1] "package:RJDBC" "package:DBI"
>>
>>> find('dbSendUpdate')
>> [1] "package:RJDBC"
>>
>> And from ?dbSendUpdate
>>
>> 'dbSendQuery' and 'dbSendUpdate' submit a SQL query to the
>> database. The difference between the two is only that
>> 'dbSendUpdate' is used with DBML queries and thus doesn't return
>> any result set.
>>
>> I would find this helpful, because I could then use scripts unmodified
>>with
>> either ROracle or RJDBC.
>> (I suppose adding it to DBI would mean that the one in RJDBC would have
>>to
>> be modified.)
>>
>>
>> I have:
>>
>> Package Version
>> "DBI" "0.3.0"
>>
>> Package Version
>> "RJDBC" "0.2-4"
>>
>>
>> Thanks
>> -Don
>>
>> --
>> Don MacQueen
>> Lawrence Livermore National Laboratory
>> 7000 East Ave., L-627
>> Livermore, CA 94550
>> 925-423-1062
>>
>
>
>
>--
>http://had.co.nz/
More information about the R-sig-DB
mailing list