18 Apr
2007
18 Apr
'07
3:39 a.m.
I know I have participated in a discussion like this before, but couldn't find the issue. So here it is again: What about passing a unique identifier along with every call of db_rewrite_sql? Instead of just wrapping db_rewrite_sql() we could also pass $module and $key so we have accurate namespaces for each query. (Or, we could just do it like hook_mail_alter(), but I think there could be namespace conflicts if a module named foo_module's foo_module_key screws with a module named foo's foo_module_key :P)
this was proposed in the original db_rewrite_sql() but didn't get in. We called them query hints or somesuch ... We had enough to chew on at that time. It is time to try again, as you propose.