Permalink
Browse files

Add doExplainPlan on DBAdapter

Return PropelException
Used to return Exception in adapter without override of doExplainPlan function
  • Loading branch information...
1 parent b7669e3 commit 03dda95a84446cc34f4841c25d826b2d649cbff1 @ddalmais ddalmais committed Mar 16, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 runtime/lib/adapter/DBAdapter.php
@@ -580,4 +580,16 @@ public function bindValue(PDOStatement $stmt, $parameter, $value, ColumnMap $cMa
return $stmt->bindValue($parameter, $value, $cMap->getPdoType());
}
+
+ /**
+ * Do Explain Plan for criteria
+ *
+ * @param PropelPDO $con propel connection
+ * @param ModelCriteria $query query
+ * @throws PropelException if explain plan is not implemented for adapter
+ * @return PDOStatement A PDO statement executed using the connection, ready to be fetched
+ */
+ public function doExplainPlan(PropelPDO $con, ModelCriteria $query) {
+ throw new PropelException("Explain plan is not implemented for this adapter");
+ }
}

0 comments on commit 03dda95

Please sign in to comment.