From: Bruce Badger <bruce_badger@badgerse.com>
To: pgsql-interfaces@postgresql.org <pgsql-interfaces@postgresql.org>
Subject: Smalltalk driver
Date: Mon, 10 Jul 2000 08:41:12 -0400
Message-ID: <3969C468.48BB51B5@badgerse.com> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: bruce_badger@badgerse.com
Subject: Re: Smalltalk driver
In-Reply-To: <3969C468.48BB51B5@badgerse.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox