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
-
Interface Summary Interface Description OnInterface Illustrates PL/Java functions on an interface instead of a class.OnInterface.A -
Class Summary Class Description Aggregates A class demonstrating several aggregate functions.AnyTest Provides example methods to illustrate the polymorphic typesany
,anyarray
, andanyelement
.ComplexScalar Complex (re and im parts are doubles) implemented in Java as a scalar UDT.ComplexTuple Complex (re and im parts are doubles) implemented in Java as a mapped UDT.ConditionalDDR Test of a very simple form of conditional execution in the deployment descriptor using only the<implementor name>
specified for an<implementor block>
.Enumeration Confirms the mapping of PG enum and Java String, and arrays of each, as parameter and return types.Holdability Demonstrate holdability of ResultSets (test for issue 168).IntWithMod An integer-like data type accepting a type modifier: IntWithMod(even) or IntWithMod(odd).JDBC42_21 Exercise new mappings between date/time types and java.time classes (JDBC 4.2 change 21).OnInterface.B OnInterface.B.C Parameters Some methods used for testing parameter and return value coersion and resolution of overloaded methods.PassXML Class illustrating use ofSQLXML
to operate on XML data.PassXML.SQLXMLMock Class that will mock anSQLXML
instance, returning only binary or character stream data from a byte array or string supplied at construction.PassXML.SQLXMLProxy Class that will proxy methods to anotherSQLXML
class.PGF1010962 A gnarly test of TupleDesc reference management, crafted by Johann Oskarsson for bug report 1010962 on pgFoundry.Point 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.PreJSR310 Some tests of pre-JSR 310 date/time/timestamp conversions.RecordParameterDefaults Example demonstrating the use of aRECORD
parameter as a way to supply an arbitrary sequence of named, typed parameters to a PL/Java function.ReturnComposite Demonstrates@Function(out={...})
for a function that returns a non-predeclared composite type.SetOfRecordTest Example implementing theResultSetHandle
interface, to return theResultSet
from any SQLSELECT
query passed as a string to theexecuteSelect
function.SPIActions Some methods used for testing the SPI JDBC driver.ThreadTest Test control of access to 1-thread backend by n-thread JVM.Triggers Example creating a couple of tables, and a function to be called when triggered by insertion into either table.TypeRoundTripper A class to simplify testing of PL/Java's mappings between PostgreSQL and Java/JDBC types.UDTScalarIOTest A special user-defined type simply to exercise the I/O routines.UnicodeRoundTripTest Test that strings containing characters from all Unicode planes are passed between PG and Java without alteration (issue 21).UsingProperties An example that retrieves aProperties
resource, and returns (key,value) rows from it by implementing theResultSetProvider
interface.UsingPropertiesAsScalarSet 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.Variadic Provides example methods to illustrate variadic functions.VarlenaUDTTest A User Defined Type with varlena storage, testing github issue 52.XMLRenderedTypes Class illustrating use ofSQLXML
to operate on non-XML data types for which PL/Java provides an XML rendering.