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

Dawei101/ctx support #29

Merged
merged 13 commits into from
Jan 4, 2021
Merged

Dawei101/ctx support #29

merged 13 commits into from
Jan 4, 2021

Conversation

dawei101
Copy link

@dawei101 dawei101 commented Dec 14, 2020

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

@codecov
Copy link

codecov bot commented Dec 14, 2020

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
Copy link
Member

fifsky commented Dec 15, 2020

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
Copy link
Author

dawei101 commented Jan 4, 2021

Pls review again, thanks

@fifsky

@fifsky
Copy link
Member

fifsky commented Jan 4, 2021

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