go-open-soql-parser
Open source implementation of the SOQL parser for Go.

🧭 Examples
🚀 Getting started
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(&buf, jsonStr, "", " ")
fmt.Println(buf.String())
}
⚖️ License
MIT
Copyright (c) 2023 Shellyl_N and Authors.