Skip to content

Commit

Permalink
chore: Update documentation to clarify relationship queries
Browse files Browse the repository at this point in the history
  • Loading branch information
iamber12 authored Jun 29, 2024
1 parent 2abc9b6 commit fce76a9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,29 @@ if err != nil {
}
```

### Handling Relationship Queries

When querying Salesforce objects, it's common to access fields that are related through parent-child or lookup relationships. For instance, querying `Account.Name` with related `Contact` might look like this:

##### Example SOQL Query
```sql
SELECT Id, Account.Name FROM Contact
```

#### Corresponding Go Structs
To effectively handle the data returned by this query, define your Go structs as follows:

```go
type ContentDocumentLink struct {
Id string
Account Account
}

type Account struct {
Name string
}
```

## SObject Single Record Operations

Insert, Update, Upsert, or Delete one record at a time
Expand Down

0 comments on commit fce76a9

Please sign in to comment.