Version: v0.32.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 3 Imported by: 0



Package query implements querying through the Salesforce data service. It is a non-trivial problem because:

- The API response shape is weird - Subqueries can themselves be paginated.

The first is generally manageable and nothing so out of the ordinary. The second however is a big problem from an API/interface perspective. It doesn't make sense to paginate subqueries to a caller, because they probably don't have the context to use the subquery. It's also just incredibly difficult to program the caller-based pagination of subqueries.

So we choose to hide the subquery pagination as an implementation detail. Again, not ideal, but probably the best choice.

We do, however, still support top-level query pagination.



This section is empty.


This section is empty.


func All

func All(o *Options)

func Query

func Query(cb PageCallback, options ...Option) error

func Tooling

func Tooling(o *Options)


type HttpGetter

type HttpGetter func(string) ([]byte, error)

type Option

type Option func(*Options)

func ApiVersion

func ApiVersion(v string) Option

func HttpGet

func HttpGet(f HttpGetter) Option

func InstanceUrl

func InstanceUrl(url string) Option

func QS

func QS(v string) Option

func Tail

func Tail(tail string) Option

type Options

type Options struct {
	// contains filtered or unexported fields

func (Options) UrlTail

func (o Options) UrlTail() string

type PageCallback

type PageCallback func([]Record) bool

type Record

type Record struct {
	Attributes struct {
		Type string
		Url  string
	Fields map[string]interface{}
	Raw    map[string]interface{}

func Eager

func Eager(options ...Option) ([]Record, error)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL