On Sun, Dec 16, 2018 at 10:25:11AM -0800, Todd Blanchard via Pharo-users wrote:
> Metacello new
> repository: 'github://pharo-rdbms/glorp-sqlite3';
> baseline: 'GlorpSQLite';
Pharo 6 or 7? 32- or 64-bit?
> This seems to be the only way to get SQLite support? There is no
> standalone UFFI library? Not that I have a problem with it, I know
> and like GLORP.
GlorpSQLite is built on the standalone SQLite UFFI library.
> Then I ran the basic UDBCSQLite tests and they all fail with 'External
> module not found'. I presume this means that the sqlite library was
> not found but the best I can find is a method #library that returns
> Reading the well written
> https://files.pharo.org/books-pdfs/booklet-uFFI/UFFIDRAFT.pdf I gather
> that I should subclass FFILibrary to make a SQLiteLibrary and have
> UDBCSQLite class that implements #macModuleName to return
The library was written before that convention was established.
Currently it is UDBCSQLite3Library (subclassing Object) and its #library
Now 64-bit Pharo 60543 finds the dylib, the SQLite tests run and pass.
I also tested keeping the '3.0' in the dylib file name, modifying the
#library method accordingly, and evaluating 'UDBCSQLite3Library reset'
to clear the singleton class variable.
I've not run into this situation before because I've always used my own
custom SQLite shared library that includes JSON, FTS etc extensions.
For good measure I also ran the Glorp tests and got 891 run, 890 passes,
1 error. The error is due to my changing SQLite's boolean handling, see
The test error has been fixed for Pharo 7. Not yet back-ported for Pharo
To load GlorpSQLite for Pharo 7, use the Catalog Browser, or,
equivalently, load from my repo:
Cool! Please let me know how this goes.
Back in Pharo 4's Native Boost days, NBSQLite as it was called then
supported both SQLite and SQLcipher. I had experimented with loading
libsqlcipher3 from UDBCSQLcipher3Library, which subclasses
UDBCSQLite3Library, and IIRC also via some class variable in
UDBCSQLite3Library determining which shared library to load. Torsten
Bergmann kindly ported NBSQLite to UFFI. The SQLcipher part is still on
my to-do list, and I am also interested to have (Glorp|UDBC)SQLite load
Spatialite (and maybe even libspatialitecipher) cleanly.