Michael Bayer wrote:
Please let me know if there's a better way!

you should use TypeDecorator.load_dialect_impl(dialect), check the "name" of 
the dialect,

Why the name rather than doing:

if isinstance(dialect,MySQLDialect):

?

then return either MSString(arguments) or super.load_dialect_impl().

Okay, but where do I get the arguments from?

super(CaseSensitiveUnicode,self).load_dialect_impl(dialect) leads to:

263             if isinstance(self.impl, TypeDecorator):
264                 return self.impl.dialect_impl(dialect)
265             else:
266                 return dialect.type_descriptor(self.impl)

...which then ends up in some adapt_type stuff that looked pretty hairy.
All I want to do is insert a collation argument when the dialect is MySQL...

cheers,

Chris

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

Reply via email to