On Sat, May 1, 2010 at 12:15 PM, Richard Hipp <d...@sqlite.org> wrote: > On Sat, May 1, 2010 at 9:25 AM, Tim Romano <tim.romano...@gmail.com> wrote: > >> I am aware that SQLite supports >> loadable extensions, but would the SQLite architecture also permit the >> integration of an interpreted scripting language? An integrated scripting >> language makes an already powerful database engine orders of magnitude more >> useful especially when one is solving ad hoc data problems requiring very >> rapid turnaround. >> > > See http://www.sqlite.org/tclsqlite.html for the original. SQLite began > life as a TCL extension. In fact, we often think of SQLite as a TCL > extension that escaped into the wild. > > The integration between TCL and SQLite is very tight. If you know where to > look, you will see that many features of SQLite were designed specifically > to support integration with TCL. > > An example of TCL using SQLite: > > db eval {SELECT name FROM people WHERE personid=$personid} { > puts name=$name > }
If I understand correctly what is being illustrated here then the sqldf package in R (http://sqldf.googlecode.com) has a similar facility. For example. from the R command line: > # installs everything needed into R > install.packages("sqldf") > > # loads everything needed into R workspace > library(sqldf) > > # create R data frame (similar concept to an SQL table) > DF <- data.frame(a = 1:3, b = 4:6) > > # the next statement notices that DF is an R data frame, > # it automatically creates an sqlite data base in memory, > # sets up table definition for DF by issuing create table stmt, > # loads DF into the sqlite data base, > # performs the query returning a new data frame > # and deletes the sqlite data base > > sqldf("select * from DF where a < 3") a b 1 1 4 2 2 5 The actual interfaces between R and sqlite is in the DBI and RSQLite R packages and sqldf sits on top of those. The RSQLite package also includes a copy of sqlite. Installing and loading sqldf automatically installs and loads its dependencies. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users