DBAL-38: Unused DBAL\Events (preExecute, postExecute)... #1569

Closed
doctrinebot opened this Issue Dec 23, 2009 · 9 comments

2 participants

@doctrinebot

Jira issue originally created by user bjori:

The ORM has a neat collection of Events, but the DBAL doesn't have any.
There is an DBAL/Events.php class which has defined constants for preExec, postExec, preExecute and postExecute (similar to ORM/Events.php), but these seem to be completely unused.
The only event/loging seems to be the ->logSql() event.

A preExecute & postExecute events would be great for timing/profiling queries.

@doctrinebot

Comment created by @jwage:

Roman, do we want to implement these? If so I can produce a patch.

@doctrinebot

Comment created by romanb:

I'm not sure of their usefulness. Hannes mentions timing queries but this is not really possible since many queries are not executed through execute()/executeUpdate() but rather through prepare() and then execute() on the Statement.

Are there any other good use-cases?

@doctrinebot

Comment created by @beberlei:

Hm timing and profiling could either be done with vendor-tools or we extend the SqlLogger interface a bit like i proposed in a previous issue. I dont see any other use-cases.

@doctrinebot

Comment created by romanb:

Personally I find timing queries in php code not very useful since its very inaccurate and you dont get any further information.

@doctrinebot

Comment created by shurakai:

If there are no other use cases, +1 for removal.

@doctrinebot

Comment created by shurakai:

Has any decision been made on whether to remove or not?

@doctrinebot

Comment created by romanb:

I think they can be removed as the DBAL SQLLogger now also records the execution time.

@doctrinebot

Comment created by @beberlei:

Removed!

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.0.0-BETA4 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment