Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

replace retval of ToDB with {}interface(nil) #1044

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

koron
Copy link

@koron koron commented Jul 21, 2018

instead of []byte(nil).

current custom types can't be set to NULL.
because some drivers (like lib/pq) don't consider that []byte(nil) is NULL . when ToDB() return nil, it is []byte(nil).

This PR checks return values from ToDB(), and when it is []byte(nil)
translates those to {}interface(nil). it is treated as NULL

@codecov-io
Copy link

codecov-io commented Jul 21, 2018

Codecov Report

Merging #1044 into master will decrease coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1044      +/-   ##
==========================================
- Coverage   54.28%   54.24%   -0.05%     
==========================================
  Files          41       41              
  Lines        7551     7557       +6     
==========================================
  Hits         4099     4099              
- Misses       2936     2941       +5     
- Partials      516      517       +1
Impacted Files Coverage Δ
session_convert.go 22.1% <0%> (-0.19%) ⬇️
statement.go 66.66% <0%> (-0.18%) ⬇️

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 ad69f7d...19b2069. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants