db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Dudgeon <tdudg...@informaticsmatters.com>
Subject Restricted table function that narrows data
Date Wed, 11 May 2011 16:02:46 GMT
I'm trying to write a restricted table function that retrieves data from 
a different database and needing some clarification on how the 
"narrowing" of the data is supposed to work. The docs mentions that 
initScan() is called like this:

initScan( new String[] { "ID", null, null, "FIRSTNAME", "LASTNAME" } ...)

e.g. that null values are specified for the unneeded columns.
Then the docs continues:

For each row, Derby calls:
     MyVTIClass.getInt( 1 ) to get the id column.
     MyVTIClass.getString( 4 ) to get the firstName column.
     MyVTIClass.getString( 5 ) to get the lastName column.

e.g. Derby expects the ResultSet to be as wide as the full un-restricted 
ResultSet

How is this supposed to work? Are columns 2 and 3 supposed to be 
supplied, but have null values so that they do not have to be retreived 
from the second database.
e.g. something like

select id, null, null, firstname, lastname from employee

(though that syntax is not legal).

Any advice gratefully received.

Thanks

Tim


Mime
View raw message