Greg Ewing wrote: > On 3/29/06, Adam DePrince <[EMAIL PROTECTED]> wrote: > >>>>> rs.execute( "select upc, description, price from my_table" ) >>>>> data = rs.fetch().fieldby( 'price','upc') >>>>> print type( data ) >> <MultiViewMapping> > > Seems to me it would be a better idea for the DB > module to return tuple-with-attributes objects for > the rows in the first place, rather than plain > tuples. > > When I get around to reworking my custom Firebird > module, I'm going to make it do that.
I find it fairly useless when database-specific drivers fancy up their results, because I can't rely on them, and they all work differently, and I have to stick to the lowest common denominator. Which is off-topic here, except to say that a view on the tuple would be useful in a way that returning a fancy tuple would not, because it could wrap any DB-API-compliant result set. Which might still be off-topic, since the implementation of that particular view would be mostly unrelated to any other view we've talked about here. Except perhaps to note that patterns for building light and fast views would also be nice. -- Ian Bicking | [EMAIL PROTECTED] | http://blog.ianbicking.org _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com