On Tue, Jul 12, 2011 at 10:45:56PM +0100, Timothy W. Grove wrote: > Thanks for your advice, Oleg, but could you help me out just a little > bit more? By 'You must drop it yourself', are you meaning that I need to > go back to using plain old SQL? (I haven't had to do that for awhile > thanks to SQLObject!!!)
Yes, plain old SQL. SQLObject doesn't map any Python operation to SQL or any SQL to Python (no ORM does due to impedance mismatch). SQLObject maps only limited subsets of operations, and the area of schema changes is very limited. Plain old SQL and perhaps tricky one. Can I ask - what backend do you use, MySQL? > Can I issue SQL commands to my database through > SQLObject? Thanks again for your help. Yes, from a script or even from python interactive prompt. Just open your connection the way you do in your programs and call connection.query() or connection.queryAll(). Examples: from sqlobject import connectionForURI connection = connectionForURI('mysql://...') print connection.queryAll('SHOW INDEX FOR sentence') connection.query('DROP INDEX sentence_video_unique') Oleg. -- Oleg Broytman http://phdru.name/ p...@phdru.name Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss