Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
29ea8ff9
Commit
29ea8ff9
authored
Mar 05, 2002
by
Dave Cramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch by Nicolas Verger to correctly propogate SQLWarning to the Statement and ResultSet
parent
ff2f9b66
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
src/interfaces/jdbc/org/postgresql/ResultSet.java
src/interfaces/jdbc/org/postgresql/ResultSet.java
+32
-0
src/interfaces/jdbc/org/postgresql/Statement.java
src/interfaces/jdbc/org/postgresql/Statement.java
+12
-0
No files found.
src/interfaces/jdbc/org/postgresql/ResultSet.java
View file @
29ea8ff9
...
...
@@ -223,5 +223,37 @@ public abstract class ResultSet
return
s
;
}
/**
* The first warning reported by calls on this ResultSet is
* returned. Subsequent ResultSet warnings will be chained
* to this SQLWarning.
*
* <p>The warning chain is automatically cleared each time a new
* row is read.
*
* <p><B>Note:</B> This warning chain only covers warnings caused by
* ResultSet methods. Any warnings caused by statement methods
* (such as reading OUT parameters) will be chained on the
* Statement object.
*
* @return the first SQLWarning or null;
* @exception SQLException if a database access error occurs.
*/
public
SQLWarning
getWarnings
()
throws
SQLException
{
return
warnings
;
}
/**
* Add a warning chain to the current warning chain
* @param warnings warnings to add
*/
public
void
addWarnings
(
SQLWarning
warnings
)
{
if
(
this
.
warnings
!=
null
)
this
.
warnings
.
setNextWarning
(
warnings
);
else
this
.
warnings
=
warnings
;
}
}
src/interfaces/jdbc/org/postgresql/Statement.java
View file @
29ea8ff9
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment