Oleg Broytmann <phd <at> phd.pp.ru> writes: > > Hello! > > On Wed, Feb 14, 2007 at 10:11:34PM +0000, Luke Opperman wrote: > > Ok, put a slightly updated version on SF Patch #1653898 > > Wow! Though it is rather large it is a clever patch from a developer > with good understanding of deep SQLObject internals. Thank you for the job! > I have applied it, and the entire test suite passed, Python 2.3 and 2.4, > Postgres and SQLite. > A thing or two have drew my attention. First, I am a bit nervous about > global default_sqlrepr_db (sometimes I connect to two databases - > SQLite+Postgres, SQLite+MySQL); on the other hand even this solution is > better than simply passing None. Also test_aliases.py - test_1syntax could > be removed if there is no a way to fix it. > > Oleg.
Thanks, I do think the default_sqlrepr_db thing should be fixed in another way, such as passing db to tablesUsedDict/tablesUsedImmediate. (I think that covers all the existing cases of str-ification, which would be changed to sqlrepr's.) This doesn't stop someone from converting to string rather than sqlrepr'ing in their own code, but it wouldn't mysteriously happen out of reach in sqlbuilder's code at least. :) Connecting to multiple databases seems to be a pretty common use of SO, and more generally from a documentation / debugging perspective having to set a module-level flag is not particularly obvious nor can it be called out in the exception (not raised till the DB layer, ProgrammingError or similar). I'm ambivalent about the string comparison tests, in this case the table list is built by iterating a dictionary, so while i've probably just flipped the order by the code changes I've made, in general it's a tedious test as it's likely to fail for irrelevant typographical changes. - Luke ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
