Package org.postgresql.pljava.jdbc
Class SQLXMLImpl<V extends Datum>
java.lang.Object
org.postgresql.pljava.jdbc.SQLXMLImpl<V>
- All Implemented Interfaces:
SQLXML
Implementation of
SQLXML
for the SPI connection.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Datum
adopt
(int oid) Allow native code to claim complete control over the underlyingDatum
and dissociate it from Java.protected V
void
free()
<T extends Source>
Tstatic <T extends InputStream & Datum>
SQLXMLnewReadable
(Datum.Input<T> datum, RegType pgType, boolean synthetic) Create readable SQLXML instance over aDatum.Input
, recording the source type.static SQLXML
Create a new, initially empty and writable, SQLXML instance, whose backing memory will in a transaction-scoped PostgreSQL memory context.<T extends Result>
Tvoid
toString()
Return a description of this object useful for debugging (not the raw XML content).protected String
Return information about this object useful for debugging, prefixed with a possibly shortened form of the class name of the passed objecto
; the normal JavatoString()
will passthis
.
-
Field Details
-
m_backing
-
-
Constructor Details
-
SQLXMLImpl
-
-
Method Details
-
free
- Specified by:
free
in interfaceSQLXML
- Throws:
SQLException
-
getBinaryStream
- Specified by:
getBinaryStream
in interfaceSQLXML
- Throws:
SQLException
-
setBinaryStream
- Specified by:
setBinaryStream
in interfaceSQLXML
- Throws:
SQLException
-
getCharacterStream
- Specified by:
getCharacterStream
in interfaceSQLXML
- Throws:
SQLException
-
setCharacterStream
- Specified by:
setCharacterStream
in interfaceSQLXML
- Throws:
SQLException
-
getString
- Specified by:
getString
in interfaceSQLXML
- Throws:
SQLException
-
setString
- Specified by:
setString
in interfaceSQLXML
- Throws:
SQLException
-
getSource
- Specified by:
getSource
in interfaceSQLXML
- Throws:
SQLException
-
setResult
- Specified by:
setResult
in interfaceSQLXML
- Throws:
SQLException
-
backingIfNotFreed
- Throws:
SQLException
-
newReadable
public static <T extends InputStream & Datum> SQLXML newReadable(Datum.Input<T> datum, RegType pgType, boolean synthetic) throws SQLException Create readable SQLXML instance over aDatum.Input
, recording the source type.The source type can be used to detect efforts to store this value into a destination of a different type, and apply a verifier for type safety.
- Throws:
SQLException
-
newWritable
Create a new, initially empty and writable, SQLXML instance, whose backing memory will in a transaction-scoped PostgreSQL memory context. -
adopt
Allow native code to claim complete control over the underlyingDatum
and dissociate it from Java.- Parameters:
oid
- The PostgreSQL type ID the native code is expecting; see Readable.adopt for why that can matter.- Returns:
- The underlying
Datum
(which has its ownadopt
method the native code will call next. - Throws:
SQLException
- if thisSQLXML
instance is not in the proper state to be adoptable.
-
toString
Return a description of this object useful for debugging (not the raw XML content). -
toString
Return information about this object useful for debugging, prefixed with a possibly shortened form of the class name of the passed objecto
; the normal JavatoString()
will passthis
.Subclasses are encouraged to override, call the super method and append subclass-specific detail.
- Parameters:
o
- Object whose class name should be used to prefix the returned string. Passingnull
is the same as passingthis
.- Returns:
- Description of this object for debugging convenience.
-