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: (view raw or whole 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?

    Bruce Badger

Code examples

Using the driver layer ...

 | parameterSet connection result |
 parameterSet := ConnectionParameterSet new.
 parameterSet  host: '';  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.

Using the EXDI layer ...

 | connection session |
 connection := PostgreSQLEXDIConnection new.
 connection username: 'bbadger'; environment: ''.
 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.


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-2015 The PostgreSQL Global Development Group