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

feat(sql): Provided module #217

Merged
merged 17 commits into from
May 8, 2024
Merged

feat(sql): Provided module #217

merged 17 commits into from
May 8, 2024

Conversation

ekkinox
Copy link
Contributor

@ekkinox ekkinox commented May 3, 2024

Yokai SQL module:

  • based on database/sql
  • support of mysql, postgres and sqlite
  • with a hooking mechanism decorating Conn, Tx, Stmt, etc
  • with 2 ready to use hooks: for logging (yokai logs), tracing (yokai OTEL traces)

@ekkinox ekkinox changed the title feat(sql): Added hooks mechanism feat(sql): Provided module May 3, 2024
Copy link

codecov bot commented May 3, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 55 lines in your changes are missing coverage. Please review.

Project coverage is 93.92%. Comparing base (c61e6f0) to head (bf0d7f0).

Files Patch % Lines
sql/connection.go 80.88% 30 Missing and 13 partials ⚠️
sql/register.go 72.72% 4 Missing and 2 partials ⚠️
sql/statement.go 94.64% 4 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #217      +/-   ##
==========================================
- Coverage   96.40%   93.92%   -2.48%     
==========================================
  Files         151       25     -126     
  Lines        5319      906    -4413     
==========================================
- Hits         5128      851    -4277     
+ Misses        136       38      -98     
+ Partials       55       17      -38     
Flag Coverage Δ
config ?
fxconfig ?
fxcore ?
fxcron ?
fxgenerate ?
fxgrpcserver ?
fxhealthcheck ?
fxhttpclient ?
fxhttpserver ?
fxlog ?
fxmetrics ?
fxorm ?
fxtrace ?
fxworker ?
generate ?
grpcserver ?
healthcheck ?
httpclient ?
httpserver ?
log ?
orm ?
sql 93.92% <92.85%> (?)
trace ?
worker ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

sql/hook/util_test.go Outdated Show resolved Hide resolved
@ekkinox ekkinox requested a review from ndk May 7, 2024 21:06
@ekkinox ekkinox requested review from xvzf and Skyld May 7, 2024 21:54
@ekkinox ekkinox marked this pull request as ready for review May 7, 2024 21:55
sql/registry.go Outdated Show resolved Hide resolved
sql/system_test.go Show resolved Hide resolved
sql/convert.go Outdated Show resolved Hide resolved
Copy link

@ndk ndk left a comment

Choose a reason for hiding this comment

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

I've left some minor suggestions, but overall, LGTM.

@ekkinox ekkinox merged commit 3c643e7 into main May 8, 2024
6 checks passed
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.

None yet

2 participants