Class AnyTest
java.lang.Object
org.postgresql.pljava.example.annotation.AnyTest
Provides example methods to illustrate the polymorphic types
any
,
anyarray
, and anyelement
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Log (at INFO level) the Java class received for the passed argument.static Object
logAnyElement
(Object param) Log (at INFO level) the Java class received for the passed argument, and return the same value.static Object[]
Return the Java object received for the passed argument, wrapped in a one-element array with the object's class as its element type.
-
Constructor Details
-
AnyTest
public AnyTest()
-
-
Method Details
-
logAny
@Function(schema="javatest", effects=IMMUTABLE, onNullInput=RETURNS_NULL) public static void logAny(@SQLType("pg_catalog.any") Object param) throws SQLException Log (at INFO level) the Java class received for the passed argument.- Throws:
SQLException
-
logAnyElement
@Function(schema="javatest", effects=IMMUTABLE, onNullInput=RETURNS_NULL, type="pg_catalog.anyelement") public static Object logAnyElement(@SQLType("pg_catalog.anyelement") Object param) throws SQLException Log (at INFO level) the Java class received for the passed argument, and return the same value.- Throws:
SQLException
-
makeArray
@Function(schema="javatest", effects=IMMUTABLE, onNullInput=RETURNS_NULL, type="pg_catalog.anyarray") public static Object[] makeArray(@SQLType("pg_catalog.anyelement") Object param) Return the Java object received for the passed argument, wrapped in a one-element array with the object's class as its element type.
-