Class XMLRenderedTypes
- java.lang.Object
-
- org.postgresql.pljava.example.annotation.XMLRenderedTypes
-
@SQLAction(implementor="postgresql_xml", requires="pgNodeTreeAsXML", install="WITH a(t) AS (SELECT adbin FROM pg_catalog.pg_attrdef LIMIT 1) SELECT CASE WHEN pgNodeTreeAsXML(t) IS DOCUMENT THEN javatest.logmessage(\'INFO\', \'pgNodeTreeAsXML ok\') ELSE javatest.logmessage(\'WARNING\', \'pgNodeTreeAsXML ng\') END FROM a") public class XMLRenderedTypes extends Object
Class illustrating use ofSQLXML
to operate on non-XML data types for which PL/Java provides an XML rendering.Everything mentioning the type XML here needs a conditional implementor tag in case of being loaded into a PostgreSQL instance built without that type.
-
-
Constructor Summary
Constructors Constructor Description XMLRenderedTypes()
-
-
-
Constructor Detail
-
XMLRenderedTypes
public XMLRenderedTypes()
-
-
Method Detail
-
pgNodeTreeAsXML
@Function(schema="javatest", implementor="postgresql_xml", provides="pgNodeTreeAsXML") public static SQLXML pgNodeTreeAsXML(@SQLType("pg_node_tree") SQLXML pgt) throws SQLException
- Throws:
SQLException
-
-