try attaching a fully reproducing test case, since the one I created
seems to work.

On Oct 6, 6:45 pm, Martijn Moeling <[EMAIL PROTECTED]> wrote:
> I have been investigating some more and solved the issue
> by changing the unbound Unicode to UnicodeText
>
> I am using SA 0.5r1 and mysql 5.x
>
> the unbound Unicode worked with 0.4, I had to upgrade to 0.5 for some  
> other stuff I used and this confused me.
>
> Nevertheless the Fields defined in the DavBaseClass are still not  
> Quoted and the ones defined in the Javascript class are...
> Maybe something in the DeclerativeMeta left from 0.4? the quoting  
> seems to be changed
>
> Thanks!
>
> On Oct 6, 2008, at 8:18 PM, Michael Bayer wrote:
>
>
>
> > test case:
>
> > from sqlalchemy import *
> > from sqlalchemy.orm import *
> > from sqlalchemy.ext.declarative import DeclarativeMeta,
> > declarative_base
>
> > class DavBaseClass(DeclarativeMeta):
> >    def __init__(self,ClassName,Bases,dict_):
> >        dict_['displayname']            =
> > Column(Unicode(255),quote=True)
> >        return DeclarativeMeta.__init__(self,ClassName,Bases,dict_)
>
> > Base = declarative_base(metaclass=DavBaseClass)
>
> > engine = create_engine('postgres://scott:[EMAIL PROTECTED]/test',
> > echo=True)
>
> > class Javascript(Base):
> >    __tablename__       = "Javascript"
> >    Id                  = Column(Integer, primary_key = True)
> >    Source              = Column(Unicode())
> >    Minified            = Column(Unicode())
>
> > Base.metadata.drop_all(engine)
> > Base.metadata.create_all(engine)
>
> > output (showing just the CREATE TABLE portion):
>
> > CREATE TABLE "Javascript" (
> >    "Id" SERIAL NOT NULL,
> >    "Source" VARCHAR,
> >    "Minified" VARCHAR,
> >    "displayname" VARCHAR(255),
> >    PRIMARY KEY ("Id")
> > )
>
> > note that "quote=True" will not have this effect if you're using 0.4.
> > Also the quoting style you're using there seems to indicate the usage
> > of MySQL, but a datatype of VARCHAR on that platform would not be
> > accepted, so questions persist...
--~--~---------~--~----~------------~-------~--~----~
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