We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
How would you parse a query to an AST using sql/ast ?
sql/ast
I tried to find a parse method but couldn't.
The code would look something like:
query := "SELECT * FROM users WHERE age > 30" stmt, err := ast.Parse(query) if err != nil { fmt.Println("Erreur d'analyse :", err) return } fmt.Printf("AST: %#v\n", stmt)
Robin,
The text was updated successfully, but these errors were encountered:
I guess that's it ?
package main import ( "fmt" "github.com/chrislusf/gleam/sql/parser" ) func main() { sql := "SELECT * FROM users WHERE age > 30" p := parser.New() tree, err := p.ParseOneStmt(sql, "", "") if err != nil { fmt.Printf("error") return } fmt.Printf("AST: %#v\n", tree) }
Sorry, something went wrong.
No branches or pull requests
Hello,
How would you parse a query to an AST using
sql/ast
?I tried to find a parse method but couldn't.
The code would look something like:
Robin,
The text was updated successfully, but these errors were encountered: