[Pljava-dev] advice needed

From: info at wyse-systems(dot)ltd(dot)uk (info at wyse-systems(dot)ltd(dot)uk)
To:
Subject: [Pljava-dev] advice needed
Date: 2005-02-16 01:01:11
Message-ID: 249610-2200523161111193@M2W049.mail2web.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Hi,

'quick' query to all of you gurus:

I need to return a setof predefined complex type (similar to what a view
does in 8.0) using pljava class, but found the pljava interface rather
confusing:

According to the docs I would need to implement assignRowValues to set the
resulting columns for each row returned (defined by the 'currentRow' int
parameter of this method). I found this rather inefficient - if I use a
ResultSet within my class do I have to call rs.seek(currentRow) each time
the assignRowValues method is called (i.e. rs.seek(2), then rs.seek(3) when
the enxt call comes etc)?

Am I missing something here?

Also, in the jdbc sub-package there are quite a few SPI* methods which seem
to mirror their counterparts from the SQL standard (or so was my
impression).

What is the purpose of these and how can I utilise them, am I better of
using them instead of the 'standard' ones (I have absolutely *no* knowledge
of PostgreSQL internals)? Is it better to use SPIConnection for e.g. rather
than the 'normal' SQL Connection?

The examples given in the examples.jar for complex types return in pljava
are rather daft as they do not use sql result set at all (simple int
addition and a timestamp) so I can't see how to utilise a ResultSet rows
and return them one by one (if that is the idea of assignRowValues).

Appologiles for getting my hands on so many things - I just got into this
(with Oracle is so much easier - you just type #sql select ?,?,? from
my.table in java and off-you-go - it is all done without much hasle.

TA!

George

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2005-02-16 07:41:02 [Pljava-dev] advice needed
Previous Message Radu-Adrian Popescu 2005-02-15 17:38:14 [Pljava-dev] execute pl/java function