summaryrefslogtreecommitdiffstats
path: root/lib/public/Diagnostics/IQueryLogger.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Diagnostics/IQueryLogger.php')
-rw-r--r--lib/public/Diagnostics/IQueryLogger.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/public/Diagnostics/IQueryLogger.php b/lib/public/Diagnostics/IQueryLogger.php
index 58ea78795e2..3ab491a2751 100644
--- a/lib/public/Diagnostics/IQueryLogger.php
+++ b/lib/public/Diagnostics/IQueryLogger.php
@@ -3,7 +3,12 @@
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Morris Jobke <hey@morrisjobke.de>
+<<<<<<< HEAD
* @author Robin Appelman <robin@icewind.nl>
+=======
+ * @author Robin Appelman <icewind@owncloud.com>
+ * @author Piotr Mrowczynski <piotr@owncloud.com>
+>>>>>>> a5095447b7... Adjust query/event logging code in favour of more complex owncloud/diagnostics (#27643)
*
* @license AGPL-3.0
*
@@ -33,6 +38,10 @@ use Doctrine\DBAL\Logging\SQLLogger;
*/
interface IQueryLogger extends SQLLogger {
/**
+ * Mark the start of a query providing query SQL statement, its parameters and types.
+ * This method should be called as close to the DB as possible and after
+ * query is finished finalized with stopQuery() method.
+ *
* @param string $sql
* @param array $params
* @param array $types
@@ -41,14 +50,30 @@ interface IQueryLogger extends SQLLogger {
public function startQuery($sql, array $params = null, array $types = null);
/**
+ * Mark the end of the current active query. Ending query should store \OCP\Diagnostics\IQuery to
+ * be returned with getQueries() method.
+ *
* @return mixed
* @since 8.0.0
*/
public function stopQuery();
/**
+ * This method should return all \OCP\Diagnostics\IQuery objects stored using
+ * startQuery()/stopQuery() methods.
+ *
* @return \OCP\Diagnostics\IQuery[]
* @since 8.0.0
*/
public function getQueries();
+
+ /**
+ * Activate the module for the duration of the request. Deactivated module
+ * does not create and store \OCP\Diagnostics\IQuery objects.
+ * Only activated module should create and store objects to be
+ * returned with getQueries() call.
+ *
+ * @since 12.0.0
+ */
+ public function activate();
}