Skip to content

greycode/MySQLParser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQLParser


A Parser for MySQL's SQL.


News

  • Add # comment
  • Partly supported(Need more test!)
  • select
  • insert
  • update
  • delete

Known Issues


What

Take Select as example

SELECT * FROM TableName; # comment by ent-worm
  • Type: select
  • Tables name used: TableName

How

  • JAVACC, parse statements from top to bottom.
  • tr & sed for clean origin query file

Method

./clean.sh input [output]
String sql_statement = "select * from table1";

SimpleQuery q = new SimpleQuery(sql_statement);

String type = q.getType();
List<String> tables = q.getTables();

About

A Parser for MySQL's SQL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 97.6%
  • Java 1.5%
  • Other 0.9%