I am using golang SQL parser to fetch query related information from actual SQL query string. I am able to find the type of query using following code:
queryType := sqlparser.StmtType(sqlparser.Preview(sql))
fmt.Println(queryType)
but i am not sure how to get actual table names from sql query. The documentation is not clear as well. Only information i get from parse function is a statement
Can someone guide me how can get this information using golang sqlparser?