[squeak-dev] Testing PostgresV3
tim at rowledge.org
Tue Jul 9 19:56:58 UTC 2019
(Apologies for taking so long to reply to this; all sorts of server 'fun')
> On 2019-07-03, at 2:54 AM, Levente Uzonyi <leves at caesar.elte.hu> wrote:
>> This was a bit more tricky than I'd like because there is no immediately obvious advice on installing. First time I tried to load the "oh that looks a plausible root package" PostgresV3 but it actually locked up my image completely. So that's probably not the thing to load...
>> Loading Core, Help & DBAPI seems to have installed a basic setup ok. It's certainly nice to have the Help package added to the system, but it would need quite a lot of expansion to assist DB-newbies like me.
> Right. The "root" package is only there to keep the full history or the project. It was split into multiple packages a while ago, but the "root" package should still work in Squeak 4.3 and/or 4.4.
> If you want to load everything there is, then use the following installer script:
> Installer ss
> project: 'PostgresV3';
> addPackage: 'JSON';
> addPackage: 'PostgresV3-Core';
> addPackage: 'PostgresV3-Pool';
> addPackage: 'PostgresV3-Json';
> addPackage: 'PostgresV3-CodeMirror';
> addPackage: 'PostgresV3-Help';
> addPackage: 'PostgresV3-DBAPI';
> addPackage: 'PostgresV3-Tests-Core';
> addPackage: 'PostgresV3-Tests-Pool';
> or you can use the Monticello Configuration:
> MCMcmUpdater updateFromRepository: 'http://squeaksource.com/PostgresV3'.
OK; good to know but it would be helpful to have this easily findable. Could it at least go in the swiki page for the squeaksource project pages?
And should I have found the MCMcmUpdater thing in the MCConfiguration browser - because I don't appear to be able to see anything in that, which strikes me as a possible problem.
> You definitely don't need everything from here. What you need depends on what you want to achieve with the database and Squeak.
> You'll need PostgresV3-Core for sure.
> As its name suggests, PostgresV3-Pool contains a connection pool. It is convenient to have one around, but if your application is single-threaded and you want to write SQL queries as strings, then you can get away with not setting up one.
> The JSON (which is a fork of the original JSON package) and the PostgresV3-Json packages provide JSON support (queries can have json parameters and can return json objects).
> PostgresV3-CodeMirror provides a way to interact with the database as an API. There are functions you can call which can return objects/rows.
> PostgresV3-DBAPI is a way to write SQL strings and execute them. I have never really used it, because I prefer the API-way. Balázs wrote a mail about the latter.
I suspect the CodeMirror stuff might prove useful. Today for the first time I was able to connect to a remote database (after much fun finding out which pg_hba.conf file we needed to edit and what to add to it) and retrieve data. Very cool.
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Useful random insult:- Has a one-way ticket on the Disoriented Express.
More information about the Squeak-dev