On Jun 13, 9:04 am, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Jun 13, 2007, at 12:35 AM, Ian Charnas wrote:
>
>
>
> > Inspired by the SQLAlchemy docs, I'm writing a documentation generator
> > in python using a combination of epydoc (for parsing/introspection),
> > genshi (templates), docutils (for restructured text), and pygments
> > (syntax highlighting).. and I just noticed that the documentation for
> > classes mapped by SQLAlchemy always includes the methods like
> > "select", "count", "get_by", etc that were added by the mapper.  This
> > is very undesirable, and I'm looking for a way to detect which methods
> > were added to the class by the SQLAlchemy mapper, and which methods
> > were there to begin with.
>
> > Does anyone have any ideas?  I was hoping there would be something
> > like "Animal.select.mapper" or "Animal.select._sqlalchemy" that I
> > could use to differentiate which methods were added by the mapper and
> > which were there originally, but I can't seem to find any such thing.
>
> SQLAlchemy does not add methods to classes, the assignmapper
> extension does.  dont use the assign_mapper extension.

Ah, that makes perfect sense.  Thanks for the explanation!  I'll
either switch my projects to use mapper, or override
"mokeypatch_query_method" and "monkeypatch_objectstore_method" in
assignmapper so that they flag the methods they add.

Michael Bayer, you inspire me.  Thank you.
-Ian Charnas


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to