Received: from localhost.localdomain (IDENT:root@[207.124.85.86]) by hub.org (8.10.1/8.10.1) with ESMTP id e6ACe8W56731 for ; Mon, 10 Jul 2000 08:40:08 -0400 (EDT) Received: from badgerse.com (IDENT:bbadger@catbert [192.168.1.12]) by localhost.localdomain (8.9.3/8.9.3) with ESMTP id IAA14059 for ; Mon, 10 Jul 2000 08:39:24 -0700 Message-ID: <3969C468.48BB51B5@badgerse.com> Date: Mon, 10 Jul 2000 08:41:12 -0400 From: Bruce Badger X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: en MIME-Version: 1.0 To: "pgsql-interfaces@postgresql.org" Subject: Smalltalk driver Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200007/42 A Smalltalk driver has been developed for PostgreSQL. It consists of two libraries, the driver library is implemented in terms of PostgreSQL interface concepts (message etc.), and the second library is a mapping of the driver library to the ViaualWorks EXDI (think of JDBC) interface. I've included a couple of example of the libraries being used below. What steps need to be taken to get these Smalltalk libraries listed on the PostgreSQL web site? Thanks. Bruce Badger ------------------------------------- Code examples Using the driver layer ... | parameterSet connection result | parameterSet := ConnectionParameterSet new. parameterSet host: '192.168.12.12'; port: 5432; databaseName: 'test1'; userName: 'bbadger'. connection := PostgreSQLConnection using: parameterSet. connection executeQuery: 'create table test04 (a int2, b int2)'. connection executeQuery: 'insert into test04 values (1, 1)'. connection executeQuery: 'insert into test04 values (2, 1)'. connection executeQuery: 'insert into test04 values (3, 1)'. result := connection executeQuery: 'select a, b from test04'. connection executeQuery: 'drop table test04'. connection close. ^result Using the EXDI layer ... | connection session | connection := PostgreSQLEXDIConnection new. connection username: 'bbadger'; environment: '192.168.12.12_test1'. connection connect. session := connection getSession. session prepare: 'INSERT INTO exdiTest06 (name, phone) VALUES(?, ?)'. #(#('Curly' 'x47') #('Moe' 'x29') #('Larry' 'x83')) do: [:entry | session bindInput: entry; execute; answer]. connection disconnect. ^self