Forum OpenACS Improvement Proposals (TIPs): Re: TIP #37 (Proposed): Queries in XQL file conventions
As far as the general philosophy regarding changes to coding standards go ... I don't see much sense in deciding to make major changes to the way we do things unless we're also going to decide to make old code adhere to the new way of doing things.
And if we're going to drop query files for generic queries while maintaining them for RDMBS-specific queries ... it just feels like the worst of both approaches. I'd much rather have all queries separated or all queries inline, myself. One or the other. And at the time the decision to use query files was made, the half-dozen or so of us discussing it seemed to agree on this point, at least.
I don't remember anyone suggesting that having some queries inline, others in query files was an agreeable solution.
To be honest if it weren't for the desire to support existing ACS packages with no change in our first OpenACS release, the db_* API procs would've been changed to take an explicit -sql parameter if SQL was being passed in (as we do for dynamic queries build from db_map calls) with no sql param passed in at all in the normal case.
Anyway I'm interested in feedback from other OCT members...
-sqlswitch in order to use inline queries sounds just fine to me. It's clearer than what we have now, and it should be fairly easy to go through a whole codebase and update the inline queries to that new syntax.