Skip to content

Dawei101/ctx support#29

Merged
fifsky merged 13 commits into
ilibs:masterfrom
dawei101:dawei101/ctx_support
Jan 4, 2021
Merged

Dawei101/ctx support#29
fifsky merged 13 commits into
ilibs:masterfrom
dawei101:dawei101/ctx_support

Conversation

@dawei101

@dawei101 dawei101 commented Dec 14, 2020

Copy link
Copy Markdown
  1. Support context in hooks
  2. Autotime feature support int(int/int64/uint/uint64) type

@codecov

codecov Bot commented Dec 14, 2020

Copy link
Copy Markdown

Codecov Report

Merging #29 (0660975) into master (e2442f9) will increase coverage by 1.20%.
The diff coverage is 88.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #29      +/-   ##
==========================================
+ Coverage   75.59%   76.79%   +1.20%     
==========================================
  Files          15       15              
  Lines         635      655      +20     
==========================================
+ Hits          480      503      +23     
+ Misses        109      105       -4     
- Partials       46       47       +1     
Impacted Files Coverage Δ
model.go 76.15% <70.00%> (-1.27%) ⬇️
db.go 67.23% <100.00%> (+1.32%) ⬆️
hook.go 87.50% <100.00%> (+22.28%) ⬆️
util.go 93.84% <100.00%> (+0.40%) ⬆️

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 e2442f9...0660975. Read the comment docs.

@fifsky

fifsky commented Dec 15, 2020

Copy link
Copy Markdown
Member

I prefer to
Use(" db ").WithContext (ctx).Model (&User{}).Get ()

eg:
https://gorm.io/docs/context.html

This was referenced Dec 23, 2020
Closed
@dawei101

dawei101 commented Jan 4, 2021

Copy link
Copy Markdown
Author

Pls review again, thanks

@fifsky

@fifsky

fifsky commented Jan 4, 2021

Copy link
Copy Markdown
Member

good PR

@fifsky fifsky merged commit c46c895 into ilibs:master Jan 4, 2021
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.

2 participants