From 29ea8ff9b13f7e4e42d18a04a46e5cc3d8f9cfd2 Mon Sep 17 00:00:00 2001 From: Dave Cramer Date: Tue, 5 Mar 2002 18:02:44 +0000 Subject: Patch by Nicolas Verger to correctly propogate SQLWarning to the Statement and ResultSet --- src/interfaces/jdbc/org/postgresql/Statement.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/interfaces/jdbc/org/postgresql/Statement.java') diff --git a/src/interfaces/jdbc/org/postgresql/Statement.java b/src/interfaces/jdbc/org/postgresql/Statement.java index dbd061bfd39..ea2cc0d0c33 100644 --- a/src/interfaces/jdbc/org/postgresql/Statement.java +++ b/src/interfaces/jdbc/org/postgresql/Statement.java @@ -110,6 +110,18 @@ public abstract class Statement timeout = seconds; } + /** + * This adds a warning to the warning chain. + * @param msg message to add + */ + public void addWarning(String msg) + { + if (warnings != null) + warnings.setNextWarning(new SQLWarning(msg)); + else + warnings = new SQLWarning(msg); + } + /* * The first warning reported by calls on this Statement is * returned. A Statement's execute methods clear its SQLWarning -- cgit v1.2.3