Hello, Seth created a branch for me on which I've made merged the changes, which is at: https://hedgehog.fhcrc.org/compbio/r-dbi/branches/RSQLite-ak/ Regards, Ashish Version 0.4-7 ============= * Upgraded to SQLite 3.3.8 * Use .SQLitePkgName instead of hard-coding the package name when using .Call * The SQLite driver has a new logical parameter "shared.cache" to enable the shared-cache mode, which allows multiple connections to share a single data and schema cache. See http://www.sqlite.org/sharedcache.html * dbConnect() now has a logical parameter "loadable.extensions" which will allow loading of extensions. See the Loadable Extensions documentation: http://www.sqlite.org/cvstrac/wiki?p=LoadableExtensions * Implemented dbCommit() and dbRollback(). There is also a new generic method dbBeginTransaction(), which begins a transaction. Note that this is an extension to the DBI interface. * Update to the SQLite 3 API for fetching records. This means that the records are pulled from the database as required, and not cached in memory as was previously done. * Added generic methods dbSendPreparedQuery() and dbGetPreparedQuery() which are similiar to dbSendQuery() and dbGetQuery(), but take an extra "bind.data" parameter, which is a data frame. The statement is assumed to contain bind variables. Bind variables are either for a column name (":name" or "@name") or for a column index ("?") in the data frame. See http://sqlite.org/capi3ref.html for more details. dbGetPreparedQuery(con, "INSERT INTO table1 VALUES (:col1)", data.frame(col1=c(1, 2)) ) Each bind variable in the query has to be bound only once, either via named or positional parameters. If it is not bound or is bound more than once (due to a mix or positional/named parameters) an error is thrown. Any extra columns in the data frame are ignored. If you are having a lot of string parameters, ensuring that they are wrapped via calls to I() would reduce allocated memory, as by default string vectors are converted to factors. See ?I and ?data.frame for more details.
RSQLite enhancements
4 messages · Ashish Kulkarni, Seth Falcon
5 days later
Hi Ashish, "Ashish Kulkarni" <ashish.kulkarni at kalyptorisk.com> writes:
Seth created a branch for me on which I've made merged the changes, which is at: https://hedgehog.fhcrc.org/compbio/r-dbi/branches/RSQLite-ak/ Regards, Ashish Version 0.4-7 =============
Sorry for the delay. The changes look good. I was just testing out a
merge into trunk...
If you can cleanup the doc, I will merge the changes into trunk.
Here's what R CMD check is showing:
* checking for code/documentation mismatches ... WARNING
Codoc mismatches from documentation object 'SQLite':
SQLite
Code: function(max.con = 16, fetch.default.rec = 500, force.reload =
FALSE, shared.cache = FALSE)
Docs: function(max.con = 16, fetch.default.rec = 500, force.reload =
FALSE)
Argument names in code not in docs:
shared.cache
* checking Rd \usage sections ... WARNING
Documented arguments not in \usage in documentation object 'sqliteSupport':
limit
Functions with \usage entries need to have the appropriate \alias entries,
and all their arguments documented.
The \usage entries must correspond to syntactically valid R code.
See the chapter 'Writing R documentation files' in manual 'Writing R
Extensions'.
Best,
+ seth
Sorry for the delay. The changes look good. I was just testing out a merge into trunk... If you can cleanup the doc, I will merge the changes into trunk. Here's what R CMD check is showing: [snip]
Fixed the documentation, please review it and let me know if I missed anything. Regards, ashish
I wrote:
Sorry for the delay. The changes look good. I was just testing out a merge into trunk...
And I spoke a bit too soon it seems. R is freezing when testing the changes introduced in r200. Seems memory related as the hang only occurs after a number of calls to RSQLite code. "Ashish Kulkarni" <ashish.kulkarni at kalyptorisk.com> writes:
Fixed the documentation, please review it and let me know if I missed anything.
The doc fixes look good, thanks. I have merged up to r195 without trouble and will wait on the rest until some fixes are available. Best, + seth