Skip to content

Question: Query To AST parser #202

@robinportigliatti

Description

@robinportigliatti

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,

Metadata

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