Hello everyone, I was looking into NBSQLite3 using the guide on smalltalkhub, pasted it below.
1. NBSQLite3 seems to be missing from "Tools" -> "Configuration Browser" so I had to use the Gopher script. 2. I can't seem to get the around to installing the sqlite engine on my mac. What is the default folder there? Do I need this? 2a. On the same page with the one above. What is the location where the db.sqlite file must be copied to? On the mac I can put it in the same folder (no go) or "show package contents" on Pharo itself to see the folders inside the package, tried Contents/Resources there but no dice. No matter what I try I get a NBSQLite3Error: unable to open database file form one of the reasons above. Thank you, Mir S. Installation You can access NBSQLite3 from the Pharo configuration browser. Just select "Tools" -> "Configuration Browser" from the world menu, enter "NBSQLite3" and install the stable version. Alternatively to install the packages manually into your Pharo image just evaluate: Gofer new url: 'http://smalltalkhub.com/mc/PharoExtras/NBSQLite3/main'; package: 'ConfigurationOfNBSQLite3'; load. ((Smalltalk at: #ConfigurationOfNBSQLite3) project stableVersion) load. If you need access to the SQLite3 database engine you need at a minimum the "NBSQLite3-Core" package which is loaded by the ConfigurationOfNBSQLite3 class. This package includes all necessary API to access the sqlite engine. Use in your own application Providing the library files To use the sqlite3 database engine in own Pharo projects you need to install the "sqlite3" database engine first. Basically it is only a shared library component that has to be found by the Pharo virtual machine. For instance on Windows operating system you can download the "sqlite3.dll" component from http://www.sqlite.org/ and copy it into the same directory where the Pharo VM (Pharo.exe) is. After loading NBSQLite3 as described before you can run the unit tests to see if anything is correctly setup and the virtual machine is able to find the sqlite3 engine. Use in your code Creating a connection The most important class to use for creating a database is the class NBSQLite3Connection. For instance the following expression: NBSQLite3Connection on: 'myfile.db'.