On Saturday 14 June 2008 06:50:23 Russell Warren wrote: > > so far i have found these ways to hack somebeody else's source: > > a) inherit the class, replace whatever, use the new version - > > works if it is just you using the new-stuff > > b) complete replacement: import thatclass; thatclass.method = > > your-own-version > > c) partial hacks: inspect.get_source( that method); replace some > > lines in that with yours; compile; replace the method with the > > new version. this works if u have sources; if its just *.pyc, > > sorry. > > All good ways. I was planning on b), but I just couldn't (can't) > locate the right replacement location underneath the SQLA classes > I'm using (Session, Engine, Metadata, etc). Where the heck is the > Compiler? it depends.. there is DefaultCompiler (called AnsiCompiler in 0.3) which is used when u do not have an engine yet (meta =Metadata()). and all dialects inherit from it. see dbcook/misc/aggregator/tests/convertertest.py for another hack for better visibility/str() of bindparams. also dbcook/misc/metadata/autoload is fiddling a bit with dialects.
"grep" - and your very own eyes - are your friends. and of course trial+error... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---