Skip to content

Commit e92b92c

Browse files
authored
Update README.md
1 parent 7fe90df commit e92b92c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
11
# python_parse_sql.py
22
for parse sql statement with Python,like lex/yacc
3+
4+
output example:
5+
6+
select b,z,a from cuishou where b = 'k' and z > 6 and y = 5 order by b,z
7+
['SELECT', ['b', 'z', 'a'], 'FROM', 'cuishou', 'WHERE', ['b', '=', 'k'], 'AND', ['z', '>', '6'], 'AND', ['y', '=', '5'], 'ORDER', 'BY', ['b', 'z']]
8+
- and1_expr: ['z', '>', '6']
9+
- and2_expr: ['y', '=', '5']
10+
- columns: ['b', 'z', 'a']
11+
- order_by_terms: ['b', 'z']
12+
- table: ['cuishou']
13+
- where_expr: ['b', '=', 'k']
14+
15+
Expected "SELECT"

0 commit comments

Comments
 (0)