2a46539fe5
- optionally set pointer behind matches - added detection for incomplete statements SQl-Browser / SQL-Box: - output error message if query is incomplete
36 Zeilen
904 B
PHP
36 Zeilen
904 B
PHP
<?php
|
|
/**
|
|
* This file is part of MySQLDumper released under the GNU/GPL 2 license
|
|
* http://www.mysqldumper.net
|
|
*
|
|
* @package MySQLDumper
|
|
* @subpackage SQL-Parser
|
|
* @version SVN: $Rev$
|
|
* @author $Author$
|
|
*/
|
|
|
|
/**
|
|
* Class to parse MySQL DROP statements.
|
|
* This enables you to analyze and modify MySQL queries, which the user has entered.
|
|
*
|
|
* @package MySQLDumper
|
|
* @subpackage SQL-Parser
|
|
*/
|
|
class Msd_Sql_Parser_Statement_Drop implements Msd_Sql_Parser_Interface
|
|
{
|
|
/**
|
|
* Parse the statement.
|
|
*
|
|
* @param Msd_Sql_Object $statement MySQL DROP statement.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function parse(Msd_Sql_Object $sql)
|
|
{
|
|
$sql->setState('Drop');
|
|
$endOfStatement = $sql->getPosition(';');
|
|
$statement = $sql->getData($endOfStatement);
|
|
$sql->setPointer($endOfStatement);
|
|
return $statement;
|
|
}
|
|
}
|