[Twisted-Python] generic enterprise.row.RowObject?
James Y Knight
foom at fuhm.net
Fri Apr 8 11:17:24 EDT 2005
On Apr 8, 2005, at 9:29 AM, <Henning.Ramm at mediapro-gmbh.de> wrote:
> For a simple database abstraction module I once wrote some table class.
> Now I'm trying to port it to twisted and thought it should inherit from
> enterprise.row.RowObject. (I hope that isn't deprecated?)
> RowObject urges me to declare all the table properties as class
> My old class reads this information directly from the database (show
> to adapt itself to a set of similar tables, and I'd like to keep this
> Seems like I would need some RowObjectFactory that takes a connection
> and a table name and returns a RowObject - or how would you do this?
RowObject isn't deprecated, but is woefully unmaintained. It is missing
a bunch of functionality that is probably necessary for many
applications. It would be nice if someone took it over and added the
necessary functionality. As such, the recommendation for it has
generally been "if you like it, go ahead and use it, but you'll
probably find it's missing something you need." If you're comfortable
with that, and are willing to extend it as necessary, that's great.
Even better if you submit the changes back. I haven't looked at row in
a long time, but I thought it did have some functionality in there
meant for autogenerating the class from the database schema. Maybe I
was just wishing it did, though.
More information about the Twisted-Python