I am hoping to use SQLite3's generate_series Table-Valued Function from within R's sqldf
library, which in turn uses the RSQLite
library. I expect once installed/configured, I will be able to call it as:
sqldf('SELECT value FROM generate_series(5,100,5)')
From reading Run-Time Loadable Extensions, I understand I will need to first call load_extension(X), specifically as
sqldf('select load_extension("C:\\my\\path\\to\\sqlite\\pathext\\misc\\series.c")')
However, I also read that Extension loading is off by default, and I can not figure out how I will have to turn it on from within a sqldf
call. Is this possible at all? Will I have to compile my own sqlite3 with this default toggled?
Further, I would like to confirm that there is no shortcut to Compiling A Loadable Extension myself with MinGW, because apparently without compiling ext/misc/series.c, I will find that SQLite generate_series is missing, and none of the Downloads provide it compiled.
If I understand correctly, I will NOT have to compile all of SQLite, I can use the downloaded version in conjunction with the extension compiled by me.
Finally, how do I assure that the version of sqlite3 that sqldf
/ RSQLite
picks up is the one I've configured? Will this force me to compile my own RSQLite
rather than simply install.packages(c('RSQLite'))
?
All this seems like a lot of work just for the sake of this one extension. Is there a better way to go?
Thanks for your helps!