Class SetOfRecordTest

java.lang.Object
org.postgresql.pljava.example.annotation.SetOfRecordTest
All Implemented Interfaces:
ResultSetHandle

@SQLAction(requires="selecttorecords fn", install=" SELECT CASE WHEN r IS DISTINCT FROM ROW(\'Foo\'::varchar, 1::integer, 1.5::float, 23.67::decimal(8,2), \'2005-06-01\'::date, \'20:56\'::time, \'192.168\'::cidr) THEN javatest.logmessage(\'WARNING\', \'SetOfRecordTest not ok\') ELSE javatest.logmessage(\'INFO\', \'SetOfRecordTest ok\') END FROM javatest.executeselecttorecords( \'select \'\'Foo\'\', 1, 1.5::float, 23.67, \'\'2005-06-01\'\', \'\'20:56\'\'::time, \'\'192.168.0\'\'\') AS r(t_varchar varchar, t_integer integer, t_float float, t_decimal decimal(8,2), t_date date, t_time time, t_cidr cidr)") public class SetOfRecordTest extends Object implements ResultSetHandle
Example implementing the ResultSetHandle interface, to return the ResultSet from any SQL SELECT query passed as a string to the executeSelect function.