Here it is: http://www.sqlalchemy.org/trac/ticket/1244

Maybe it is good idea to drop some new lines in faq? Something like
this:

Q: How should I extend sqlalchemy.schema.Column?
A: You surely dont need it. Recommended way to achive your possible
needs is to write instance-factory function which decorates creation
of sqlalchemy.schema.Column instances.

Q: But I'm really need it!
A: Ok. To subclass Column, this is the current recipe:

from sqlalchemy.sql.util import Annotated, annotated_classes

class MyColumn(Column):
    ...

class AnnotatedMyColumn(Annotated, MyColumn):
    pass

annotated_classes[MyColumn] = AnnotatedMyColumn

Do not forget to put AnnotatedMyColumn in the module namespace, or
your schema will not be pickleable!

Correct me please if I am wrong somewhere and excuse me for my
English.

On 11 дек, 01:23, Michael Bayer <[EMAIL PROTECTED]> wrote:
> hey.... send it as an email attachment, or create a ticket in trac as  
> guest/guest and attach it there:  http://www.sqlalchemy.org/trac/newticket
>
> On Dec 10, 2008, at 5:19 PM, Angri wrote:
>
>
>
>
>
> >> if you'd like to submit a patch which defines __visit_name__ for all
> >> ClauseElements and removes the logic from VisitableType to guess the
> >> name, it will be accepted.  The second half of VisitableType still  
> >> may
> >> be needed since it improves performance.
>
> > Ok, I did it. Can not find where I can attach file to message in
> > google groups, so I put it in paste bin:http://paste.org/index.php?id=4463
>
> > I made some automated tests to make sure that nothing will break.
> > Existing Visitable's descendants after applying the patch will have
> > exactly the same value of __visit_name__ property. I also put small
> > test from first message in the topic. It fails with vanila trunk and
> > pass ok with patched.
>
> > Take a look, please.
--~--~---------~--~----~------------~-------~--~----~
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