Open haroroda opened 7 years ago
The parser will process the SQL to a AST statement object. The type is in the list { DeleteStmt , InsertStmt, UnionStmt ,UpdateStmt, SelectStmt, ShowStmt ... } . Every statement is a struct , you can decode the struct to get the format you want.
Hi how can i parse a query and get every part of the query and its name? i.e. query1: INSERT INTO QBAdminGroup.abmc_contacts(id, name) VALUES (1, 'jimmy') output1: 'DML', 'Keyword', 'Identifier', 'Keyword', 'Parenthesis' query2: select 2 from admin output2: 'DML', 'Integer', 'Keyword', 'Keyword'
the query part's name no need to be the same as the outputs,but i wonder if sqlparser has similar function or something else.Thanks!