Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 391 Bytes

README.md

File metadata and controls

18 lines (12 loc) · 391 Bytes

mysqlparser

mysqlparser is a python lib for parsing MySQL statements.

Usage

import mysqlparser

sqlparser = mysqlparser.Parser()

sql = 'SELECT * FROM `dbData`.`tbTest` WHERE `iId` > 100 LIMIT 10'
result = sqlparser.parse(sql)
print(sqlparser.sql_list)
print(sqlparser.sql_list[0].database)
print(sqlparser.sql_list[0].table)