Skip site navigation (1) Skip section navigation (2)

Smalltalk driver

From: Bruce Badger <bruce_badger(at)badgerse(dot)com>
To: "pgsql-interfaces(at)postgresql(dot)org" <pgsql-interfaces(at)postgresql(dot)org>
Subject: Smalltalk driver
Date: 2000-07-10 12:41:12
Message-ID: 3969C468.48BB51B5@badgerse.com (view raw or flat)
Thread:
Lists: pgsql-interfaces
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


Responses

pgsql-interfaces by date

Next:From: Peter MountDate: 2000-07-10 13:56:52
Subject: RE: JDBC Interfaces
Previous:From: Michael AnsleyDate: 2000-07-10 12:38:18
Subject: RE: SPI documentation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group