Added statement parser for comments.
Added "Traversable" implementation to access the parsed MySQL statements with "foreach". Setted SVN keywords. Fixed DocBlocks.
Dieser Commit ist enthalten in:
Ursprung
50aadc32c5
Commit
4ce08bf58f
9 geänderte Dateien mit 145 neuen und 30 gelöschten Zeilen
33
library/Msd/Sql/Parser/Statement/Comment.php
Normale Datei
33
library/Msd/Sql/Parser/Statement/Comment.php
Normale Datei
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of MySQLDumper released under the GNU/GPL 2 license
|
||||
* http://www.mysqldumper.net
|
||||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
* @version SVN: $Rev$
|
||||
* @author $Author$
|
||||
*/
|
||||
|
||||
require_once "Msd/Sql/Parser/Interface.php";
|
||||
/**
|
||||
* Class to parse MySQL comments.
|
||||
* This enables you to analyze and modify MySQL queries, which the user has entered.
|
||||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
*/
|
||||
class Msd_Sql_Parser_Statement_Comment implements Msd_Sql_Parser_Interface
|
||||
{
|
||||
/**
|
||||
* Parse the statement.
|
||||
*
|
||||
* @param string $statement MySQL comment.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function parse($statement)
|
||||
{
|
||||
echo "Comment: $statement\n";
|
||||
}
|
||||
}
|
||||
|
|
@ -5,8 +5,8 @@
|
|||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
* @version SVN: $Rev: 1227 $
|
||||
* @author $Author: DSB $
|
||||
* @version SVN: $Rev$
|
||||
* @author $Author$
|
||||
*/
|
||||
|
||||
require_once "Msd/Sql/Parser/Interface.php";
|
||||
|
|
@ -22,7 +22,7 @@ class Msd_Sql_Parser_Statement_Create implements Msd_Sql_Parser_Interface
|
|||
/**
|
||||
* Parse the statement.
|
||||
*
|
||||
* @param string $statement MySQL INSERT statement.
|
||||
* @param string $statement MySQL CREATE statement.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
* @version SVN: $Rev: 1227 $
|
||||
* @author $Author: DSB $
|
||||
* @version SVN: $Rev$
|
||||
* @author $Author$
|
||||
*/
|
||||
|
||||
require_once "Msd/Sql/Parser/Interface.php";
|
||||
|
|
@ -22,7 +22,7 @@ class Msd_Sql_Parser_Statement_Drop implements Msd_Sql_Parser_Interface
|
|||
/**
|
||||
* Parse the statement.
|
||||
*
|
||||
* @param string $statement MySQL INSERT statement.
|
||||
* @param string $statement MySQL DROP statement.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
* @version SVN: $Rev: 1227 $
|
||||
* @author $Author: DSB $
|
||||
* @version SVN: $Rev$
|
||||
* @author $Author$
|
||||
*/
|
||||
|
||||
require_once "Msd/Sql/Parser/Interface.php";
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
* @version SVN: $Rev: 1227 $
|
||||
* @author $Author: DSB $
|
||||
* @version SVN: $Rev$
|
||||
* @author $Author$
|
||||
*/
|
||||
|
||||
require_once "Msd/Sql/Parser/Interface.php";
|
||||
|
|
@ -22,7 +22,7 @@ class Msd_Sql_Parser_Statement_Lock implements Msd_Sql_Parser_Interface
|
|||
/**
|
||||
* Parse the statement.
|
||||
*
|
||||
* @param string $statement MySQL INSERT statement.
|
||||
* @param string $statement MySQL LOCK statement.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
* @version SVN: $Rev: 1227 $
|
||||
* @author $Author: DSB $
|
||||
* @version SVN: $Rev$
|
||||
* @author $Author$
|
||||
*/
|
||||
|
||||
require_once "Msd/Sql/Parser/Interface.php";
|
||||
|
|
@ -22,7 +22,7 @@ class Msd_Sql_Parser_Statement_Unlock implements Msd_Sql_Parser_Interface
|
|||
/**
|
||||
* Parse the statement.
|
||||
*
|
||||
* @param string $statement MySQL INSERT statement.
|
||||
* @param string $statement MySQL UNLOCK statement.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
|
|
|||
Laden …
Tabelle hinzufügen
Einen Link hinzufügen
In neuem Issue referenzieren