/**
  * Get the SQL of a delete statement
  * @param DeleteStatement $statement
  * @return string SQL of the delete statement
  * @throws zibo\library\database\exception\DatabaseException when no table was added to the statement
  */
 protected function parseDeleteStatement(DeleteStatement $statement)
 {
     $tables = $statement->getTables();
     if (empty($tables)) {
         throw new DatabaseException('No tables added to the insert statement');
     }
     $table = array_shift($tables);
     $sql = 'DELETE FROM ' . $this->connection->quoteIdentifier($table->getName());
     $conditions = $statement->getConditions();
     if ($conditions) {
         $operator = $statement->getOperator();
         $sql .= ' WHERE ' . $this->parseConditions($conditions, $operator, false);
     }
     return $sql;
 }