From: avi@...4.com (Avi Bryant) Date: 2002-04-17T16:04:47+09:00 Subject: Re: Freshmeat article about Ruby jack_d_herrington@pobox.com (Jack Herrington) wrote: > I have > another article in the queue and another on the burner. The next is on > text templating and then the third is on code generation with Ruby, > specifically code generation for database access classes. Interesting. I did some playing with precisely that a while back. I haven't touched the code in ages, but it seems to still be available at http://beta4.com/kansas.tgz . You might want to take a look. The coolest thing it did was to use blocks to construct SQL statements, so that, eg, db.select(Person) {|p| p.employer.name =~ 'Micro%'} might generate "SELECT Person.name, Person.employer FROM Person, Employer WHERE Person.employer = Employer.id AND Employer.name LIKE 'Micro%'". Actually I can't remember anymore if it handled joins like that, but it was meant to. Cheers, Avi