Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

shellyln/go-open-soql-parser

Repository files navigation

go-open-soql-parser

Open source implementation of the SOQL parser for Go.

Test release Go version

logo


🧭 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())
}

🚧 TODO

  • Unit tests
  • GROUP BY ROLLUP and GROUP BY CUBE clause, GROUPING() function
  • WITH clause
  • USING 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.

πŸ”— Related projects

πŸ™‹ FAQ

  • What does SOQL stand for?
    • πŸ‘‰ In Open SOQL, SOQL stands for SOQL is Object Query Language.
    • πŸ‘‰ In original SOQL, SOQL stands for Salesforce Object Query Language.

βš–οΈ License

MIT
Copyright (c) 2023 Shellyl_N and Authors.

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /