Re: [SQLObject] ezSqlObject convenience wrapper
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Brad B. <br...@bb...> - 2004-03-07 21:26:38
|
On dimanche, mars 7, 2004, at 15:44 Canada/Eastern, Ian Bicking wrote: > On Mar 7, 2004, at 11:48 AM, Brad Bollenbach wrote: >> On samedi, mars 6, 2004, at 03:17 Canada/Eastern, David McNab wrote: >>> I've just put up a module called EzSqlObject, which wraps >>> SQLObject's connection, table and results classes, and adds a few >>> conveniences: >>> >>> * .tables attribute in connection objects, lists out the tables in >>> the database >>> * .columns attribute in table objects, lists the columns in the >>> table >>> * automatic retrieval of existing table structure from database (if >>> not provided as a table class) >>> * tables of a database available as attributes of connection object >>> * Can fetch individual rows from a table or resultset via array >>> index >>> * automatic logging >>> * dump() method in connection, table and results objects >>> * len() works for table and results objects >>> * doQuery() method for connection objects >> >> It doesn't make any sense to create another module for this. As well, >> some of these features don't make sense (e.g. I'm not sure what len() >> on a table is supposed to tell me [number of columns perhaps?], but >> len() on a SelectResults is already done by using the count() method >> on an instance.) > > I actually specifically took out len() support, because it gets called > by list() and some other functions implicitly, causing unnecessary > database queries. > > I like wrappers myself, so it's cool by me if it's a separate module. > I think tables being attributes of the connection only works for a > certain set of applications, so I don't think it belongs as a general > SQLObject feature (though maybe, I'm not sure). Sorry, but I'll have to say -1 on this. Because of its frameworkish/libraryish nature, many of SQLObject's features will only apply to a certain set of applications (which is the case with basically any framework or library.) This doesn't justify creating another codebase for what is just a few attribute and method additions. -- Brad Bollenbach |