[Pharo-users] [ANN] PUnQLite NoSQL database project updated
astares at gmx.de
Thu Jan 29 03:20:12 EST 2015
are you in need for really simple out of image persistency?
If you like to use a small RDBMS solution with Pharo then there is the embeddable SQLite
shared library and NBSQLite3 project  to access it. Combine it with Glorp  and you do
not have to fight too much with SQL.
On the other end of persistency world there are the so called "NoSQL databases" and beside
Mongo and all the others that require special setup etc. there is this wonderful small UnQLite
embeddable database  that similar to SQlite world only requires a simple library.
Thanks to Masashi Umezawa there is a nice wrapper for Pharo already to access this
tiny embeddable NoSQL database called "PUnQLite"  and , also including access to
the Jx9 machinery of UnQLite. It is really cool that he made this available.
This week I updated "PUnQLite" a little bit:
- refactored the Native boost wrapper for UnQLite (using shared pools, ...)
- documented classes
- added a help topic
- fixed a bug in cursors when accessing the keys in an empty database
- and finally added a small spec based tool to work with a database file (see attached screenshot)
One can use it to open an unqlite database, show the key value pairs and remove or add entries.
If you are in latest Pharo 4 already you can load all of that right from the config browser. Be aware
that you need the external unqlite shared library which is downloaded and extracted into a folder
"pharo-vm" when loading the config.
For instance on Windows it automagically downloads a file "pharo-vm/unqlite.dll" below your
image directory and you just have to copy this shared library file to the folder where your
VM (Pharo.exe) resides. Havent tried on other OS platforms.
>From the Pharo side using the UnQLite database basically works like having some kind
"external dictionary" in a database file. Just run that in a workspace:
db := PqDatabase open: 'comments.db'.
db transact: [
Object subclasses do: [:cls | | key |
key := cls asString.
db at: key put: cls comment ]
Then open the "Database Browser" from the world menu and open the "comments.db" file.
You can browse the keys and values, remove entries or add new. A filter for the keys
is also included. Nothing fancy but hope you like it or find it usable.
Couldnt make it to PharoConf 2015 but I hope all participants enjoy their time there.
Keep the others updated by using the #pharodays2015 on Twitter. Have fun!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 118361 bytes
Desc: not available
More information about the Pharo-users