Forum OpenACS Improvement Proposals (TIPs): Re: TIP #37 (Proposed): Queries in XQL file conventions
On the other hand, if that optional pre-processor is attractive and important purely because of performance problems (in even some cases) with handling the XQL files, then something else about the OpenACS XQL architecture or tools is probably wrong, and should be addressed separately.
Longer run, seems that Don has tentatively (hypothetically?) suggested
eliminating the XQL querfiles altogether, and defining a simple syntax
for putting all the db-specific SQL into the same Tcl files. Not
-sql switch for inline queries, but several at
The main advantage I see there is it lets (indeed, forces) you to see the same query for all the databases together at once. Upside is this would push much greater cross-db knowledge, and help eliminate spurious drift and redundancy in the Oracle vs. Postgres queries. All "official" OpenACS packages are supposed to support both databases anyway, and this would make the work of doing so somewhat easier.
The downside of course, is that it does tie support for the different databases more closely together. In the past people seemed to think it advantageous that, at least in theory, some outside group could decide to add support for a 3rd database just by adding a whole bunch of new XQL files, without having to touch the rest of the toolkit at all. But given history of Oracle and PostgreSQL support, and the continual ongoing development of the OpenACS toolkit itself, I doubt that any such "just drop in support for a 3rd database" project would be that simple. My guess is it that in reality it would need extensive co-ordination and some changes from the core OpenACS developers no matter what, whether the SQL is all in separate XQL files or not. What do you think, is my guess here wrong?
But, really, Don's
suggestion is a major change that would affect a lot of people, and
nobody's going to do it anytime soon, right? (My guess is probably
never, but not till OpenACS 5.1 at the very earliest.)
Six of one, half a dozen of the other...
If we change the way we deal with queries then we should rethink the whole thing and in that case I'd strongly prefer Don's (?) -generic, -oracle, -postgresql style. Until then, I'll happily use Bart's emacs extensions to make my life easier.