|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re: How do Monks programatically construct SQL selectsby dws (Chancellor) |
| on Sep 03, 2003 at 03:58 UTC ( [id://288534]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
How do Monks programatically construct SQL selects.
I don't. I tend to work in highly normalized schemas, with "interesting" queries (3-6 table joins, some non-equi-joins, some outer joins). I could spend time trying to warp a framework into generating workable queries, or I could code them by hand. So far, I've gotten there quicker by coding them by hand. By approaching the problem from use cases, building specific queries, I avoid having to solve a bunch of otherwise general-case problems, and can spend the time instead writing specific unit tests. The problem with programatically generated queries is edge cases--particularly vendor-specific ones. By the time you fight your way around one or two of them, you've eaten up more time than you would have spent hand-coding a few dozen queries.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||