I need a temp table in auth/db that looks exactly like the temp table in auth/ldap. But I don't want *that* code, thankyouverymuch.
The absolutely correct thing to do is to extend every XML class to dance tap on the top of a barrel take an "is_temporary" parameter, and to spit the right SQL when asked for it. And also the right SQL for dropping the table.
Sometimes a switch statement is just so much clearer (if ugly).
Will you kill me if I write a function in ddllib / dmllib that takes a table definition and has a big switch statement?
Or - have you got a magic trick?
So, I really like to have two new ddllib functions create_temp_table() and drop_temp_table(), calling exactly the same stuff than the "normal" ones but adding the required "temp" syntax.
Just one note. Everything is "normal" while handling temporary tables BUT MSSQL. It requires the tablename to begin with "#", so perhaps it would be a good idea to allow the new functions to return the "created" tablename is order to use it dynamically later (to delegate all the "db conditional stuff" to xmldb, leaving auth/db code clearer.
How does it sound?
Working for me right now, and I'll just use drop_table() if we can teach Oracle to truncate before dropping (is that really only required for temp tables?)
Edit: also some follow up commits to auth/ldap and other ddl things that you might want to check out. This is on a branch off 18_STABLE but I mean to put it in HEAD.
Matt's commits are all in HEAD already.
Perhaps it's not listed in wherever we query for existing tables...
When you say "...as well"... is it supposed to be in HEAD already? Uhm.. I forgot that (didn't notice changes in that area but some others added recently by Penny).
I think that if your changes don't affect "stable" things (just temp tables) the could fit into 18_STABLE if you need them really NOW. Else I would follow the HEAD -> xmldb-ize -> backport to 1.8 we agreed yesterday...
Eloy - sorry about the delay -- got really tangled up with the db plugins on auth and enrol and subsequent accesslib issues...
I've merged my half-breed patch into HEAD. And I'm more than happy woth the proposed
HEAD -> xmldb-ize -> backport to 1.8
And once it's there, I'll merge my auth/db and enrol/db changes into