Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return SalesforceResult when inserting data #45

Merged
merged 6 commits into from
Jul 23, 2024
Merged

Conversation

0cv
Copy link
Contributor

@0cv 0cv commented Jun 27, 2024

Address #42

@k-capehart I know we discussed I'd not work on it, but I like this Go Sfdc module the most and well .. well I just built quickly what I needed. I'm not sure it's "production" ready so I put just a draft. So to explain a bit what I did, I've mostly reused the already existing salesforceError which I renamed to SalesforceResult. And instead of formatting the error, which I don't think is a good idea, I'm returning this struct to the client. Then that's the client which can iterate through the result and analyze the errors accordingly (and get the created Sfdc ID). I've also plugged it into InsertOne. Again it fits my needs, but it might need some polishing so for now I think it's more like an implementation idea.

Copy link
Contributor

@ccoVeille ccoVeille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's draft, but please consider my review

dml_test.go Show resolved Hide resolved
salesforce.go Outdated Show resolved Hide resolved
@k-capehart
Copy link
Owner

@0cv Thanks for drafting this! 🏆

I really like these suggestions, I think its a much needed improvement. What I'll end up doing is pull these changes into another branch and do some testing + any updates that might be needed. Once that's done, I'll ping you for another review. And then since this would technically be a breaking change I'll roll it out as version 2.0.0 🚀

@k-capehart k-capehart merged commit 317e6b3 into k-capehart:main Jul 23, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants