velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Bauman" <n...@cortexity.com>
Subject Re: ResultSetIterator
Date Thu, 12 Jul 2001 16:16:00 GMT
> Krzysztof Ogrodnik wrote:
>> 
>> Hello,
>> 
>> I'm new to velocity. Probably I have missed something but I don't know
>> how to properly insert ResultSet object to the velocity context. AFAIK
>> it requires Iterator so I have created a simple class
>> ResultSetIterator that wraps ResultSet object. But why isn't such
>> class available in velocity already? I thing it's important to be able
>> to easy insert ResultSet to the context.
> 
> Other people do different things.  I tend to not deal with result sets
> directly, but preprocess the data into something else.  My result sets
> tend to be small though.

Exposing a ResultSet directly (or nearly directly by wrapping it in some
kind of Collection) in your page is generally not advisable unless you're
merely testing.

> So the answer is basically that people have different ways of doing it
> (so no one solution is perfect) and further, this is more of an
> application/ app framework issue and doesn't really belong in Velocity.
> 
> geir

I use a Object-to-Relational transaction framework at my job that gives me
access to the interesting business objects constructed from the database. I
never deal with the database directly. Velocity never sees anything but a
call to this framework.

-Nick


Mime
View raw message