Here is a PostgreSQL database interface for Squeak, a wonderful Smalltalk implementation. In the spring of 2005, Leonardo Cecchi (l.cecchi@mind-informatica.com) greatly improved upon the code by fixing some bugs, adding SmalltalkX compatability, and creating SUnit tests.
See the class comments for PSQLClient and the class methods
PSQLClient class>>example1 and PSQLClient
class>>example2.
Files
- Jim-PostgreSQL-Config.st (1k)
- Jim-PostgreSQL-Backend.st (16k)
- Jim-PostgreSQL-Frontend.st (8k)
- Jim-PostgreSQL.st (23k) (Updated 2006-01-07)
- Jim-PostgreSQL-Test.st (10k)
Installing
File-in the following files in the order they are listed above (config, back end, front end, PostgreSQL, and test).
Edit PSQLConfiguration class>>initialize to reflect your
version of Smalltalk (#smalltalkx or #squeak), then
run that method.
Testing
Before running the unit tests, make sure to read the comments in
PSQLTestConfiguration class>>documentation. They tell you what
table you need to create in your test database and how to tell the tests
which database to use.
News
- 2006-01-07
- Fixed PSQLClient>>authenticate code that checks response to password command, thanks to Jess Balint (jbalint@gmail.com).
- 2005-06-26
- Bug fixes and improvements by Leonardo Cecchi (l.cecchi@mind-informatica.com). He has added SmalltalkX compatability and SUnit tests.
- 2003-07-11
-
This update adds the missing method
PSQLBMNoticeResponse>>message. It also adds new messagesPSQLClient>>query:onError:onNotice:andPSQLClient>>query:onNotice:. Either block may benil. The default error block callsObject>>error: and the default notice block callsObject>>inform:. Thanks to Guillaume Pothier <gpothier at free.fr> for the suggestions that led to these changes. - 2003-05-09
-
This update adds user error handling. The new method
PSQLClient>>query:onError:takes a block that gets called when something goes wrong. The block is passed the error message string.
License
This Squeak PostgreSQL database interface is Copyright © 2005–2006 by Jim Menard. It is copyrighted free software released under the Apache Software License, Version 2.0, a copy of which may be found at http://www.apache.org/LICENSE.txt.