> 1. How do I override SQLiteCompiler.visit_insert without modifying
> SQLA's sqlite.py?  I of course want to avoid trashing the base SQLA
> install, but can't find an override location in the object tree
> from my session or engine or anything.
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.

i have all of these applied to various pieces of SAcode; 

as for c) i have one to niceify the select-echos and another to 
replace dicts with ordered ones for repeatability - as michael has 
not accepted patches/idea of these, i'm patching them myself. The 
echoing one is really useful. see dbcook.util.hacksrc and it's usage 
in dbcook.usage.sa_hack4repeatability and sa_hack4echo
https://dbcook.svn.sourceforge.net/svnroot/dbcook/trunk/dbcook/
http://pypi.python.org/pypi/dbcook/0.2

--~--~---------~--~----~------------~-------~--~----~
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