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.

check driver.Valuer response, and skip the column if nil #1167

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

Conversation

koron
Copy link

@koron koron commented Dec 7, 2018

Problem:
Some sort of column are updated by nil always, when type for the column implements driver.Valuer interface and it's Value() method return nil. It should check requiredField.

Solution:
Check the response value of driver.Valuer.Value(), if it is nil and not requiredField, skip the column.

@codecov-io
Copy link

Codecov Report

Merging #1167 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1167      +/-   ##
=========================================
- Coverage    54.7%   54.7%   -0.01%     
=========================================
  Files          42      42              
  Lines        7646    7648       +2     
=========================================
+ Hits         4183    4184       +1     
  Misses       2935    2935              
- Partials      528     529       +1
Impacted Files Coverage Δ
statement.go 66.96% <100%> (+0.08%) ⬆️
xorm.go 64.61% <0%> (-1.54%) ⬇️

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 fd49db5...fa40f1e. Read the comment docs.

1 similar comment
@codecov-io
Copy link

codecov-io commented Dec 7, 2018

Codecov Report

Merging #1167 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1167      +/-   ##
=========================================
- Coverage    54.7%   54.7%   -0.01%     
=========================================
  Files          42      42              
  Lines        7646    7648       +2     
=========================================
+ Hits         4183    4184       +1     
  Misses       2935    2935              
- Partials      528     529       +1
Impacted Files Coverage Δ
statement.go 66.96% <100%> (+0.08%) ⬆️
xorm.go 64.61% <0%> (-1.54%) ⬇️

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 fd49db5...fa40f1e. Read the comment docs.

mei-rune pushed a commit to mei-rune/xorm that referenced this pull request Apr 19, 2020
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.

2 participants