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(&buf, jsonStr, "", " ")
fmt.Println(buf.String())
}
- Unit tests
GROUP BY ROLLUP
andGROUP BY CUBE
clause,GROUPING()
functionWITH
clauseUSING SCOPE
clause- Formula in fieldExpression at conditionExpression (where / having)
- Polymorphic Fields
- "null Values in Lookup Relationships and Outer Joins" - If an object has a conditional expression whose right hand side is null, it is not a condition for inner join.
- cf. "Using Relationship Queries" - If the condition is complete within the parent object (no "or" across relationships), it is inner joined.
- GraphDT - Datatable
- go-open-soql-visualizer - Visualizer
- Open SOQL (JavaScript) - JavaScript implementation
- What does
SOQL
stand for?- 👉 In
Open SOQL
,SOQL
stands forSOQL is Object Query Language
. - 👉 In original SOQL,
SOQL
stands forSalesforce Object Query Language
.
- 👉 In
MIT
Copyright (c) 2023 Shellyl_N and Authors.