Added new parser to SQL-Browser / SQL-Box
Removed require_once in parser classes Added debug possibility to parser
Dieser Commit ist enthalten in:
Ursprung
50f5a5aa14
Commit
e7bc0d0b0a
9 geänderte Dateien mit 84 neuen und 28 gelöschten Zeilen
|
|
@ -9,13 +9,12 @@
|
|||
* @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
|
||||
* @subpackage SQL-Parser
|
||||
*/
|
||||
class Msd_Sql_Parser_Statement_Comment implements Msd_Sql_Parser_Interface
|
||||
{
|
||||
|
|
@ -29,5 +28,6 @@ class Msd_Sql_Parser_Statement_Comment implements Msd_Sql_Parser_Interface
|
|||
public function parse($statement)
|
||||
{
|
||||
echo "Comment: $statement\n";
|
||||
return $statement;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,13 +9,12 @@
|
|||
* @author $Author$
|
||||
*/
|
||||
|
||||
require_once "Msd/Sql/Parser/Interface.php";
|
||||
/**
|
||||
* Class to parse MySQL CREATE statements.
|
||||
* This enables you to analyze and modify MySQL queries, which the user has entered.
|
||||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
* @subpackage SQL-Parser
|
||||
*/
|
||||
class Msd_Sql_Parser_Statement_Create implements Msd_Sql_Parser_Interface
|
||||
{
|
||||
|
|
@ -28,6 +27,7 @@ class Msd_Sql_Parser_Statement_Create implements Msd_Sql_Parser_Interface
|
|||
*/
|
||||
public function parse($statement)
|
||||
{
|
||||
echo "$statement\n";
|
||||
echo "Create: $statement\n";
|
||||
return $statement;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,13 +9,12 @@
|
|||
* @author $Author$
|
||||
*/
|
||||
|
||||
require_once "Msd/Sql/Parser/Interface.php";
|
||||
/**
|
||||
* Class to parse MySQL DROP statements.
|
||||
* This enables you to analyze and modify MySQL queries, which the user has entered.
|
||||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
* @subpackage SQL-Parser
|
||||
*/
|
||||
class Msd_Sql_Parser_Statement_Drop implements Msd_Sql_Parser_Interface
|
||||
{
|
||||
|
|
@ -28,6 +27,7 @@ class Msd_Sql_Parser_Statement_Drop implements Msd_Sql_Parser_Interface
|
|||
*/
|
||||
public function parse($statement)
|
||||
{
|
||||
echo "$statement\n";
|
||||
echo "Drop: $statement\n";
|
||||
return $statement;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,13 +9,12 @@
|
|||
* @author $Author$
|
||||
*/
|
||||
|
||||
require_once "Msd/Sql/Parser/Interface.php";
|
||||
/**
|
||||
* Class to parse MySQL INSERT statements.
|
||||
* This enables you to analyze and modify MySQL queries, which the user has entered.
|
||||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
* @subpackage SQL-Parser
|
||||
*/
|
||||
class Msd_Sql_Parser_Statement_Insert implements Msd_Sql_Parser_Interface
|
||||
{
|
||||
|
|
@ -28,6 +27,7 @@ class Msd_Sql_Parser_Statement_Insert implements Msd_Sql_Parser_Interface
|
|||
*/
|
||||
public function parse($statement)
|
||||
{
|
||||
echo "$statement\n";
|
||||
echo "Insert: $statement\n";
|
||||
return $statement;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,13 +9,12 @@
|
|||
* @author $Author$
|
||||
*/
|
||||
|
||||
require_once "Msd/Sql/Parser/Interface.php";
|
||||
/**
|
||||
* Class to parse MySQL LOCK statements.
|
||||
* This enables you to analyze and modify MySQL queries, which the user has entered.
|
||||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
* @subpackage SQL-Parser
|
||||
*/
|
||||
class Msd_Sql_Parser_Statement_Lock implements Msd_Sql_Parser_Interface
|
||||
{
|
||||
|
|
@ -28,6 +27,7 @@ class Msd_Sql_Parser_Statement_Lock implements Msd_Sql_Parser_Interface
|
|||
*/
|
||||
public function parse($statement)
|
||||
{
|
||||
echo "$statement\n";
|
||||
echo "Lock: $statement\n";
|
||||
return $statement;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
33
library/Msd/Sql/Parser/Statement/Select.php
Normale Datei
33
library/Msd/Sql/Parser/Statement/Select.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$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class to parse MySQL comments.
|
||||
* This enables you to analyze and modify MySQL queries, which the user has entered.
|
||||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Parser
|
||||
*/
|
||||
class Msd_Sql_Parser_Statement_Select implements Msd_Sql_Parser_Interface
|
||||
{
|
||||
/**
|
||||
* Parse the statement.
|
||||
*
|
||||
* @param string $statement MySQL comment.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function parse($statement)
|
||||
{
|
||||
echo "Select: $statement\n";
|
||||
return $statement;
|
||||
}
|
||||
}
|
||||
|
|
@ -9,13 +9,12 @@
|
|||
* @author $Author$
|
||||
*/
|
||||
|
||||
require_once "Msd/Sql/Parser/Interface.php";
|
||||
/**
|
||||
* Class to parse MySQL UNLOCK statements.
|
||||
* This enables you to analyze and modify MySQL queries, which the user has entered.
|
||||
*
|
||||
* @package MySQLDumper
|
||||
* @subpackage SQL-Browser
|
||||
* @subpackage SQL-Parser
|
||||
*/
|
||||
class Msd_Sql_Parser_Statement_Unlock implements Msd_Sql_Parser_Interface
|
||||
{
|
||||
|
|
@ -28,6 +27,7 @@ class Msd_Sql_Parser_Statement_Unlock implements Msd_Sql_Parser_Interface
|
|||
*/
|
||||
public function parse($statement)
|
||||
{
|
||||
echo "$statement\n";
|
||||
echo "UNLOCK: $statement\n";
|
||||
return $statement;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Laden …
Tabelle hinzufügen
Einen Link hinzufügen
In neuem Issue referenzieren