[R-sig-DB] RSQLite enhancements

Ashish Kulkarni @@h|@h@ku|k@rn| @end|ng |rom k@|yptor|@k@com
Fri Oct 20 17:11:23 CEST 2006


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.




More information about the R-sig-DB mailing list