Package org.postgresql.jdbc
Class PSQLWarningWrapper
- java.lang.Object
-
- org.postgresql.jdbc.PSQLWarningWrapper
-
class PSQLWarningWrapper extends java.lang.Object
Wrapper class for SQLWarnings that provides an optimisation to add new warnings to the tail of the SQLWarning singly linked list, avoiding Θ(n) insertion time of calling #setNextWarning on the head. By encapsulating this into a single object it allows users(ie PgStatement) to atomically set and clear the warning chain.
-
-
Field Summary
Fields Modifier and Type Field Description private java.sql.SQLWarning
firstWarning
private java.sql.SQLWarning
lastWarning
-
Constructor Summary
Constructors Constructor Description PSQLWarningWrapper(java.sql.SQLWarning warning)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
addWarning(java.sql.SQLWarning sqlWarning)
(package private) java.sql.SQLWarning
getFirstWarning()
-