[DDC-2818] Adds a preQueryExecute event

Adds a new useful event, allowing to modify every query just before execution.