func()

in sobject/collections/collections.go [106:124]


func (r *Resource) Query(sobject string, records []sobject.Querier) ([]*sfdc.Record, error) {
	if r.query == nil {
		return nil, errors.New("collections resource: collections may not have been initialized properly")
	}
	if records == nil {
		return nil, errors.New("collections resource: update records can not be nil")
	}

	matching, err := regexp.MatchString(`\w`, sobject)
	if err != nil {
		return nil, err
	}

	if matching == false {
		return nil, fmt.Errorf("collection resource: %s is not a valid sobject", sobject)
	}

	return r.query.callout(sobject, records)
}