Skip to content

Question: Query To AST parser #202

Open
@robinportigliatti

Description

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:

    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,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions