agora inbox for pljava-dev@postgresql.org
help / color / mirror / Atom feedSubject: [Pljava-dev] advice needed
Date: Tue, 15 Feb 2005 20:01:11 -0500
Message-ID: <249610-2200523161111193@M2W049.mail2web.com> (raw)
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/ .
view thread (12+ messages) latest in thread
Message-ID: <249610-2200523161111193@M2W049.mail2web.com>
Permalink: ../249610-2200523161111193@M2W049.mail2web.com/
Also on: postgresql.org/message-id/249610-2200523161111193@M2W049.mail2web.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pljava-dev@postgresql.org
Subject: Re: [Pljava-dev] advice needed
In-Reply-To: <249610-2200523161111193@M2W049.mail2web.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox