Skip to content

Commit

Permalink
Merge pull request #54 from k-capehart/v2-readme-updates
Browse files Browse the repository at this point in the history
docs: update readme to fix spacing and tweak examples
  • Loading branch information
k-capehart authored Jul 23, 2024
2 parents 1d86b42 + eaf71f3 commit 08e9683
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,29 @@ type Creds struct {
}

type SalesforceResults struct {
Results []SalesforceResult
HasSalesforceErrors bool
Results []SalesforceResult
HasSalesforceErrors bool
}

type SalesforceResult struct {
Id string
Errors []SalesforceErrorMessage
Success bool
Id string
Errors []SalesforceErrorMessage
Success bool
}

type SalesforceErrorMessage struct {
Message string
StatusCode string
Fields []string
Message string
StatusCode string
Fields []string
}

type BulkJobResults struct {
Id string
State string
NumberRecordsFailed int
ErrorMessage string
SuccessfulRecords []map[string]any
FailedRecords []map[string]any
Id string
State string
NumberRecordsFailed int
ErrorMessage string
SuccessfulRecords []map[string]any
FailedRecords []map[string]any
}
```

Expand Down Expand Up @@ -321,7 +321,7 @@ contact := ContactWithExternalId{
ContactExternalId__c: "Avng0",
LastName: "Rogers",
}
err := sf.UpsertOne("Contact", "ContactExternalId__c", contact)
result, err := sf.UpsertOne("Contact", "ContactExternalId__c", contact)
if err != nil {
panic(err)
}
Expand All @@ -347,9 +347,9 @@ type Contact struct {
contact := Contact{
Id: "003Dn00000pEYQSIA4",
}
deleteErr := sf.DeleteOne("Contact", contact)
if deleteErr != nil {
panic(deleteErr)
err := sf.DeleteOne("Contact", contact)
if err != nil {
panic(err)
}
```

Expand Down Expand Up @@ -509,6 +509,7 @@ Make numerous 'subrequests' contained within a single 'composite request', reduc
- If batch size is 200, then max is 5000
- Can optionally allow partial successes by setting allOrNone parameter
- If true, then successes are still committed to the database even if a record fails
- Will return an instance of SalesforceResults which contains information on each affected record and whether DML errors were encountered

### InsertComposite

Expand Down

0 comments on commit 08e9683

Please sign in to comment.