Open source implementation of the SOQL parser for Go.
package main
import (
"bytes"
"encoding/json"
"fmt"
"github.com/shellyln/go-open-soql-parser/soql/parser"
)
func main() {
src := `
SELECT Id FROM Contact WHERE Name like 'a%'
`
ret, err := parser.Parse(src)
if err != nil {
fmt.Println(err)
}
jsonStr, err := json.Marshal(ret)
if err != nil {
println(err)
}
var buf bytes.Buffer
json.Indent(&b