[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] Example of a using DBi.Postgresql with GLORP
From: |
Tim Kack |
Subject: |
Re: [Help-smalltalk] Example of a using DBi.Postgresql with GLORP |
Date: |
Fri, 23 Oct 2009 10:28:01 +0200 |
Hi Nigel,
Thanks a lot. I will give it a go and see if I can make the failing
tests to work as well.
Cheers,
Tim
On Fri, 2009-10-23 at 10:03 +1100, Nigel Williams wrote:
> On 20/10/2009, at 9:08 AM, Tim Kack wrote:
>
> > |login accessor|
> > login := Login new database: PostgreSQLPlatform new;
> > username: 'usernameHere';
> > password: 'passwordHere';
> > connectString: '127.0.0.1_test'.
> > accessor := DatabaseAccessor forLogin: login.
> > accessor login.
>
> The version of GLORP that's packaged with GNU Smalltalk doesn't work
> with PostgreSQL.
>
> If you're planning on getting a newer version working, you may be
> interested in the work I've done porting the version that's packaged
> with VW 7.6. It's at http://elder-gods.net/~nigelw/glorp2004.tar.gz
> and while it's not complete and the test cases don't all run, I am
> actually using it day to day with a PostgreSQL database. :)
>
> The code I'm using to set the login up is:
>
> login := (Glorp.Login new)
> database: Glorp.PostgreSQLPlatform new;
> username: nil;
> password: nil;
> connectString: 'dbi:PostgreSQL:db=appdb';
> yourself.
> accessor := Glorp.DatabaseAccessor forLogin: login.
> accessor logging: true.
> accessor login.
> session := Glorp.GlorpSession new.
> session system: (MyDescriptorSystem forAccessor: accessor).
> session accessor: accessor.
>
>
> Nigel