Tim Bates wrote:
> I don't know if there is a solution to my problem, whether what I want
> can be done cleanly. To tell the truth I'm not 100% certain of what I
> want, but I visualise something like a cross between Vapor and Criteria.
> If no such thing exists, and I can't find an alternate solution I guess
> I'm back to writing it myself, or settling for some other method. It
> just seems like there should be a good way to marry the power of SQL
> (and the optimised searching/indexing and concurrency routines a good
> RDBMS provides) with the pristine Object-Orientedness of Ruby.

Tim,

I think I have an inkling of what you want.

My take on it is this: If you're going to do some coding to
meke this happen, it's easier to take an existing DB (with
fancy query capabilities and presumably efficient, reliable
data storage) and graft an OO layer onto it. (Easier, that is,
than vice versa.)

For example, you might wrap a query in a method that returned
a Struct whose member names were the database field names.

I'm sure there are complications there, but they shouldn't be
of the same order of magnitude as a full database with a full
SQL parser.


Hal