[R] Detect expired RSQLiteConnection?
h.wickham at gmail.com
Tue Sep 2 23:42:42 CEST 2014
DBI 0.3 (just released to CRAN) includes a new generic, dbIsValid(),
for exactly this purpose. Unfortunately no packages implement a method
for it yet, but eventually it will be the right way to detect this
(I'm now the maintainer for RSQLite, so I added this to my to do list:
https://github.com/rstats-db/RSQLite/issues/36. Pull requests are very
On Tue, Sep 2, 2014 at 7:32 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
> Is there a test for an expired RSQLiteConnection? For example, if I run
> f <- tempfile()
> con <- dbConnect(SQLite(), f)
> then I get
> <Expired SQLiteConnection: DBI CON (11737, 2)>
> and most operations using it give errors. (In my case I have a
> persistent connection object, but if I save the workspace and then
> reload it, I get the expired connection.) I'd like to detect this case.
> Do I need to use try(), or parse the result of printing it?
> Duncan Murdoch
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help