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

Attempt to clean up ExecSql() in JDBC

From: Anders Bengtsson <ndrsbngtssn(at)yahoo(dot)se>
To: <pgsql-patches(at)postgresql(dot)org>, <pgsql-jdbc(at)postgresql(dot)org>
Subject: Attempt to clean up ExecSql() in JDBC
Date: 2001-08-26 18:57:42
Message-ID: Pine.LNX.4.33.0108262036270.2048-300000@sensenet.localdomain (view raw or flat)
Thread:
Lists: pgsql-jdbcpgsql-patches
Hi,

Attached is my attempt to clean up the horrors of the ExecSQL() method in
the JDBC driver.

I've done this by extracting it into a new method object called
QueryExecutor (should go into org/postgresql/core/) and then taking it
apart into different methods in that class.

A short summary:

* Extracted ExecSQL() from Connection into a method object called
  QueryExecutor.

* Moved ReceiveFields() from Connection to QueryExecutor.

* Extracted parts of the original ExecSQL() method body into smaller
  methods on QueryExecutor.

* Bug fix: The instance variable "pid" in Connection was used in two
  places with different meaning. Both were probably in dead code, but it's
  fixed anyway.

/Anders


PS.: If anyone has any idea what the variable names "fqp" and "hfr" stand
for, please tell me! :)

_____________________________________________________________________
A n d e r s  B e n g t s s o n                   ndrsbngtssn(at)yahoo(dot)se
Stockholm, Sweden

Attachment: QueryExecutor.java
Description: text/plain (5.1 KB)
Attachment: execsql.patch
Description: text/plain (10.8 KB)

Responses

pgsql-patches by date

Next:From: Peter EisentrautDate: 2001-08-26 20:05:44
Subject: Re: Re: [PATCHES] Makefile.PL for Pg.so
Previous:From: Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=Date: 2001-08-26 18:46:54
Subject: Re: Re: [PATCHES] Makefile.PL for Pg.so

pgsql-jdbc by date

Next:From: Rene PijlmanDate: 2001-08-26 19:14:49
Subject: Status of JDBC test suite?
Previous:From: Rene PijlmanDate: 2001-08-26 18:41:37
Subject: JDBC Statement.executeBatch patch

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