Class Parameters
java.lang.Object
org.postgresql.pljava.example.annotation.Parameters
@SQLAction(install="CREATE OR REPLACE FUNCTION javatest.java_getTimestamptz()\tRETURNS timestamptz\tAS \'org.postgresql.pljava.example.annotation.Parameters.getTimestamp\'\tLANGUAGE java",
remove="DROP FUNCTION javatest.java_getTimestamptz()")
public class Parameters
extends Object
Some methods used for testing parameter and return value coersion and
resolution of overloaded methods.
About the @SQLAction here: the original, hand-crafted deployment
descriptor declared two SQL functions both implemented by the same
getTimestamp method here. Only one declaration can be
automatically generated from a @Function annotation on the method
itself. This @SQLAction takes care of the other declaration.
Of course, there is now a burden on the author to get this declaration right
and to keep it up to date if the method evolves, but at least it is here in
the same file, rather than in a separate hand-maintained DDR file.
- Author:
- Thomas Hallgren
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleaddNumbers(short a, int b, long c, BigDecimal d, BigDecimal e, float f, double g) static intaddOne(int value) static intstatic intaddOneLong(long value) static intcountNulls(Integer[] intArray) static intcountNulls(ResultSet input) static DategetDate()static TimegetTime()static Timestampstatic IntegernullOnEven(int value) static byteprint(byte value) static byte[]print(byte[] byteArray) static doubleprint(double value) static double[]print(double[] doubleArray) static floatprint(float value) static float[]print(float[] floatArray) static intprint(int value) static int[]print(int[] intArray) static longprint(long value) static long[]print(long[] longArray) static shortprint(short value) static short[]print(short[] shortArray) static Integer[]static voidstatic voidstatic void
-
Constructor Details
-
Parameters
public Parameters()
-
-
Method Details
-
addNumbers
public static double addNumbers(short a, int b, long c, BigDecimal d, BigDecimal e, float f, double g) -
addOne
-
addOne
-
addOneLong
-
countNulls
- Throws:
SQLException
-
countNulls
- Throws:
SQLException
-
getDate
-
getTime
-
getTimestamp
-
nullOnEven
-
print
-
print
-
print
-
print
-
print
-
print
-
print
-
print
-
print
-
print
-
print
-
print
-
print
-
print
-
print
-
print
-