Package org.postgresql.pljava.example.annotation
package org.postgresql.pljava.example.annotation
The first examples that were converted to test the annotation-driven
SQL generator instead of using hand-written SQL deployment code.
- Author:
- Thomas Hallgren, Chapman Flack
-
ClassDescriptionA class demonstrating several aggregate functions.Provides example methods to illustrate the polymorphic types
any
,anyarray
, andanyelement
.Complex (re and im parts are doubles) implemented in Java as a scalar UDT.Complex (re and im parts are doubles) implemented in Java as a mapped UDT.Test of a very simple form of conditional execution in the deployment descriptor using only the<implementor name>
specified for an<implementor block>
.Confirms the mapping of PG enum and Java String, and arrays of each, as parameter and return types.Demonstrate holdability of ResultSets (test for issue 168).An integer-like data type accepting a type modifier: IntWithMod(even) or IntWithMod(odd).Exercise new mappings between date/time types and java.time classes (JDBC 4.2 change 21).Example code to support querying for the modules in Java's boot layer.Illustrates PL/Java functions on an interface instead of a class.Some methods used for testing parameter and return value coersion and resolution of overloaded methods.Class illustrating use ofSQLXML
to operate on XML data.Class that will mock anSQLXML
instance, returning only binary or character stream data from a byte array or string supplied at construction.Class that will proxy methods to anotherSQLXML
class.A gnarly test of TupleDesc reference management, crafted by Johann Oskarsson for bug report 1010962 on pgFoundry.Example of a "mirrored UDT": a user-defined type that exposes to Java the internal representation of an existing (but not SQL-standard) PostgreSQL type.Some tests of pre-JSR 310 date/time/timestamp conversions.Example demonstrating the use of aRECORD
parameter as a way to supply an arbitrary sequence of named, typed parameters to a PL/Java function.Demonstrates@Function(out={...})
for a function that returns a non-predeclared composite type.Example implementing theResultSetHandle
interface, to return theResultSet
from any SQLSELECT
query passed as a string to theexecuteSelect
function.Some methods used for testing the SPI JDBC driver.Test control of access to 1-thread backend by n-thread JVM.Example creating a couple of tables, and a function to be called when triggered by insertion into either table.A class to simplify testing of PL/Java's mappings between PostgreSQL and Java/JDBC types.A special user-defined type simply to exercise the I/O routines.Test that strings containing characters from all Unicode planes are passed between PG and Java without alteration (issue 21).An example that retrieves aProperties
resource, and returns (key,value) rows from it by implementing theResultSetProvider
interface.This implementation uses another function that returns a set of a complex type, concatenates the name and value of that type and returns this as a set of a scalar type.Provides example methods to illustrate variadic functions.A User Defined Type with varlena storage, testing github issue 52.Class illustrating use ofSQLXML
to operate on non-XML data types for which PL/Java provides an XML rendering.