Hi Andrew, Your fix feels like the more correct way to do it (I say this w/out being familiar with this section of code).
It makes sense that the single slurp would be faster but I'm wondering how much practical difference in speed it makes. I suppose it depends on the number of tables... I would say that your suggestion of doing the eval first is reasonable. What do other people think? Ben On Thu, 2007-11-15 at 17:18 +0000, Andrew Ford wrote: > Hi > > I have started using SQL::Translator on a project where we are using SQL > Server and found that the parser kept falling over on fetching the > schema information from the database handle. I have attached a patch > that fixes this (in lib/SQL/Translator/Parser/DBI/SQLServer.pm). It is > quite straightforward - the original code tried to slurp all columns > with column_info(undef, undef, undef, undef) but the version of SQL > Server we have doesn't like that, so I have rewritten the code to get > all the tables first and call column_info on each table in turn. It now > works for me. If you like I can rework it further so that it tries the > original column_info call in an eval block and then fall back to the new > code if that fails - the original code might be significantly faster if > the version of SQL Server allows it. > > Andrew > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ -- sqlfairy-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlfairy-developers
