Feature #13579
closedHook Request for t3lib_db
100%
Description
Hello Xavier,
for the introduction of uuid in TYPO3 I would need some hooks inside t3lib_DB.
Currently I need one after the code before return in
- exec_INSERTquery
- params: $this, $table, $fields_values
- exec_INSERTmultipleRows
- params: $this, $table
- exec_DELETEquery
- params: $this, $table
and one before the code in
- INSERTquery
- params: $this, $table, $field_values
- INSERTmultipleRows
- params: $this, $table, $fields, $rows
- DELETEquery
- params: $table, $where
It would be nice if the hooks would not just call functions, but would execute methods on a hook object. This is needed to keep some state between the hook methods. (see t3lib_tcemain).
Thanks in advance.
Tom
Files
Updated by Xavier Perseguers over 13 years ago
- File 13579.diff 13579.diff added
Please find enclosed a proposal that should then be implemented into DBAL too.
Updated by Thomas Maroschik over 13 years ago
Hooks look good and should work perfectly for our neeeds. Maybe these hooks could also be used by DBAL not only implemented too?
Best regards
Updated by Xavier Perseguers over 13 years ago
- Status changed from New to Under Review
- Assignee set to Xavier Perseguers
DBAL part will be tackled with once this patch has been committed as DBAL is using another repository anyway.
Please review change on Gerrit
Updated by Xavier Perseguers over 13 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Patch has been committed to master
Updated by Xavier Perseguers over 13 years ago
- Status changed from Resolved to On Hold
Actually, waiting for DBAL corresponding patch to be committed to set this patch to "resolved"
Updated by Xavier Perseguers over 13 years ago
- Target version set to 1.3.0 (TYPO3 4.6.0)
Updated by Thomas Maroschik over 13 years ago
Could we reopen that issue?
The interfaces aren't that practical as there is no way to change the given method parameters. You could define some referenced method arguments inside your hook, but then the method signature would not match the one from the interfaces.
Also in init.php there is some duplicate code from t3lib_DB->connectDB upon connecting with t3lib_DB->sql_pconnect to the database.
We could simply replace all lines in init.php with a single call to $TYPO3_DB->connectDB().
By that we would also solve the problem, that the hooks won't get initialized in backend, as t3lib_DB->connectDB is never called.
If reopened, I would push my changes to gerrit.
Updated by Xavier Perseguers over 13 years ago
- Status changed from On Hold to Under Review
Patch in Core has been merged. Review for DBAL pending at http://review.typo3.org/3073
In order to prevent two subsequent calls to preprocessing hooks for TRUNCATE and DELETE, build of actual SQL query within DBAL does not call parent:: anymore. This in turn should even very slightly improve speed at least with bulk changes.
Updated by Mr. Hudson over 13 years ago
Patch set 2 of change I652cd63ca6dd8da98c8c1b214874a8cad09ae929 has been pushed to the review server.
It is available at http://review.typo3.org/3073
Updated by Xavier Perseguers over 13 years ago
- Status changed from Under Review to Resolved
Updated by Michael Stucki almost 11 years ago
- Project changed from 329 to TYPO3 Core
- Target version deleted (
1.3.0 (TYPO3 4.6.0))