From c6c7de777ab3c8944572434443a1d37c9ab18ff5 Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Mon, 3 Oct 2016 21:25:15 +0530 Subject: [PATCH] Keep the clauses defined for DeleteStatement These may be required for use in various Utils like Utils/Query.php's replaceClause(). Fix phpmyadmin/phpmyadmin#12612 Signed-off-by: Deven Bansod --- src/Statements/DeleteStatement.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/Statements/DeleteStatement.php b/src/Statements/DeleteStatement.php index 394c0f40b..0c661389c 100644 --- a/src/Statements/DeleteStatement.php +++ b/src/Statements/DeleteStatement.php @@ -63,6 +63,25 @@ class DeleteStatement extends Statement 'IGNORE' => 3, ); + /** + * The clauses of this statement, in order. + * + * @see Statement::$CLAUSES + * + * @var array + */ + public static $CLAUSES = array( + 'DELETE' => array('DELETE', 2), + // Used for options. + '_OPTIONS' => array('_OPTIONS', 1), + 'FROM' => array('FROM', 3), + 'PARTITION' => array('PARTITION', 3), + 'USING' => array('USING', 3), + 'WHERE' => array('WHERE', 3), + 'ORDER BY' => array('ORDER BY', 3), + 'LIMIT' => array('LIMIT', 3), + ); + /** * Table(s) used as sources for this statement. *