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

Fix panics when array ptr is used for InsertAll and DeleteAll #250

Merged
merged 3 commits into from Nov 5, 2021

Conversation

Fs02
Copy link
Member

@Fs02 Fs02 commented Nov 5, 2021

Fixes #249

@codecov
Copy link

codecov bot commented Nov 5, 2021

Codecov Report

Merging #250 (b12f454) into master (e534415) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #250   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           56        56           
  Lines         3972      3967    -5     
=========================================
- Hits          3972      3967    -5     
Impacted Files Coverage Δ
association.go 100.00% <100.00%> (ø)
collection.go 100.00% <100.00%> (ø)
document.go 100.00% <100.00%> (ø)
util.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e534415...b12f454. Read the comment docs.

@Fs02 Fs02 marked this pull request as ready for review November 5, 2021 07:48
@Fs02 Fs02 requested a review from lafriks November 5, 2021 07:48
@lafriks
Copy link
Contributor

lafriks commented Nov 5, 2021

#251 is not for merging, just to see additional edge cases that needs to be handled

@lafriks
Copy link
Contributor

lafriks commented Nov 5, 2021

pretty much only additional edge cases I added was to handle nil array elements by skipping them on insert or when returning primary key value array

@lafriks lafriks added the bug Something isn't working label Nov 5, 2021
Copy link
Contributor

@lafriks lafriks left a comment

Choose a reason for hiding this comment

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

It does fixes my use case, nil checks can also be added in other PR :)

@lafriks
Copy link
Contributor

lafriks commented Nov 5, 2021

Tested also in my app, works great, thanks

@Fs02 Fs02 merged commit 6aa81d4 into master Nov 5, 2021
@Fs02 Fs02 deleted the fix-panics-when-array-ptr-used-for-insert-and-delete branch November 5, 2021 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panics when array pointer type is used for insert
2 participants