On 25.08.2006 17:00, Ken Bloom wrote:
> I'm writing a library for generating fairly complicated SQL statements in
> a relatively clean way. The current version of the library can be found at
> http://lingcog.iit.edu/~bloom/sqlstatement.rb and some sample code which
> is fairly representative of what I plan to use the library for is at
> http://lingcog.iit.edu/~bloom/newstuff.rb
> 
> I was curious if anybody had suggestions about ways they might make the
> library easier to use and/or more maintainable.

Some things you could do to make this more usable:

- Spend more whitespace, especially blank lines, to mare the code more 
readable.

- Add an introductory comment at the beginning, especially state the 
purpose of the lib

- Add a simple example that demonstrates usage of the code

Another general remark: SQL is extremely flexible, so any tool that 
generates SQL either has a GUI or restricts the output to a subset of 
SQL statements or both.  Without the restriction and a GUI such a 
library can easily get as complex as SQL itself and in that case I'd 
probably rather write SQL directly unless I get something else from such 
a lib (for example database independence).  My 0.02EUR

Kind regards

	robert