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

Add generic StorageOf[Row] #15

Merged
merged 11 commits into from
Jun 19, 2023
Merged

Add generic StorageOf[Row] #15

merged 11 commits into from
Jun 19, 2023

Conversation

vearutop
Copy link
Member

No description provided.

@github-actions
Copy link

github-actions bot commented Jan 29, 2023

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 6 1265 (+143) 860 (+94) 124 (+13) 281 (+36) 225 (+18) 28.2K (+3.7K)
Go (test) 9 1888 (+12) 1462 (+11) 64 362 (+1) 60 43.8K (+291B)

@github-actions
Copy link

github-actions bot commented Jan 29, 2023

Unit Test Coverage

total: (statements) 76.5%
changed lines: (statements) 50.9%, coverage is less than 90.0%, consider testing the changes more thoroughly

Coverage of changed lines
File Function Coverage
Total 50.9%
mapper.go 90.0%
mapper.go:86 Insert 100.0%
mapper.go:440 FindColumnNames 100.0%
mapper.go:444 findColumnNames 75.0%
referencer.go 92.5%
referencer.go:99 AddTableAlias 100.0%
referencer.go:146 Q 100.0%
referencer.go:157 Ref 100.0%
referencer.go:169 Col 100.0%
referencer.go:201 Cols 100.0%
referencer.go:180 Fmt 90.0%
referencer.go:72 ColumnsOf 85.7%
referencer.go:210 Eq 0.0%
storage.go 100.0%
storage.go:298 SelectStmt 100.0%
storage.go:309 InsertStmt 100.0%
storage.go:320 UpdateStmt 100.0%
storage.go:331 DeleteStmt 100.0%
storage.go:350 MakeReferencer 100.0%
storage_go1.18.go 0.0%
storage_go1.18.go:46 Table 0.0%
storage_go1.18.go:75 List 0.0%
storage_go1.18.go:84 Get 0.0%
storage_go1.18.go:93 SelectStmt 0.0%
storage_go1.18.go:98 DeleteStmt 0.0%
storage_go1.18.go:103 UpdateStmt 0.0%
storage_go1.18.go:108 InsertRow 0.0%
storage_go1.18.go:146 InsertRows 0.0%
Coverage diff with base branch
File Function Base Coverage Current Coverage
Total 85.7% 76.5% (-9.2%)
github.com/bool64/sqluct/mapper.go Order 76.9% no function
github.com/bool64/sqluct/mapper.go findColumnNames no function 93.8%
github.com/bool64/sqluct/referencer.go Col no function 100.0%
github.com/bool64/sqluct/referencer.go ColumnsOf 88.9% 81.8% (-7.1%)
github.com/bool64/sqluct/referencer.go Eq no function 0.0%
github.com/bool64/sqluct/referencer.go Fmt 100.0% 88.9% (-11.1%)
github.com/bool64/sqluct/storage.go MakeReferencer no function 100.0%
github.com/bool64/sqluct/storage.go Ref 100.0% no function
github.com/bool64/sqluct/storage_go1.18.go DeleteStmt no function 0.0%
github.com/bool64/sqluct/storage_go1.18.go Get 100.0% 0.0% (-100.0%)
github.com/bool64/sqluct/storage_go1.18.go InsertRow no function 0.0%
github.com/bool64/sqluct/storage_go1.18.go InsertRows no function 0.0%
github.com/bool64/sqluct/storage_go1.18.go List 100.0% 0.0% (-100.0%)
github.com/bool64/sqluct/storage_go1.18.go SelectStmt no function 0.0%
github.com/bool64/sqluct/storage_go1.18.go Table no function 0.0%
github.com/bool64/sqluct/storage_go1.18.go UpdateStmt no function 0.0%

@github-actions
Copy link

github-actions bot commented Jan 29, 2023

Go API Changes

# github.com/bool64/sqluct
## incompatible changes
(*Mapper).Order: removed
(*Referencer).Q: changed from func(...string) string to func(...string) Quoted
(*Storage).Ref: removed
## compatible changes
(*Referencer).Col: added
(*Referencer).Eq: added
(*Storage).MakeReferencer: added
Quoted: added
SerialID: added
StorageOf: added
Table: added

# summary
Inferred base version: v0.1.12
Suggested version: v0.2.0

@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2023

Codecov Report

Merging #15 (a4008e3) into master (0b24742) will decrease coverage by 8.62%.
The diff coverage is 41.11%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master      #15      +/-   ##
==========================================
- Coverage   81.38%   72.76%   -8.62%     
==========================================
  Files           5        5              
  Lines         419      470      +51     
==========================================
+ Hits          341      342       +1     
- Misses         64      113      +49     
- Partials       14       15       +1     
Flag Coverage Δ
unittests 72.76% <41.11%> (-8.62%) ⬇️

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

Impacted Files Coverage Δ
storage_go1.18.go 11.32% <0.00%> (-88.68%) ⬇️
mapper.go 90.67% <75.00%> (+0.62%) ⬆️
referencer.go 90.41% <87.09%> (-6.32%) ⬇️
storage.go 61.64% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

github-actions bot commented Jan 29, 2023

Benchmark Result

Benchmark diff with base branch
Module github.com/bool64/dev not found, downloading.
name                                 old time/op    new time/op    delta
Mapper_Insert_single-2                 8.06µs ± 1%    8.15µs ± 1%   +1.11%  (p=0.004 n=6+6)
Mapper_Insert_singleOmitempty-2        7.30µs ± 1%    7.32µs ± 1%     ~     (p=0.509 n=6+6)
Mapper_Insert_slice_heterogeneous-2    16.5µs ± 1%    16.5µs ± 1%     ~     (p=0.781 n=6+6)
Mapper_Insert_slice_homogeneous-2      12.2µs ± 1%    12.3µs ± 2%   +1.09%  (p=0.041 n=6+6)
Mapper_Select_struct-2                 6.64µs ± 1%    6.63µs ± 0%     ~     (p=1.000 n=6+6)
Mapper_Select_ref-2                    13.0µs ± 1%    13.0µs ± 0%     ~     (p=0.143 n=6+6)
Referencer_Fmt_full-2                  29.9µs ± 1%    32.8µs ± 3%   +9.63%  (p=0.002 n=6+6)
Referencer_Fmt_lite-2                  11.4µs ± 1%    12.0µs ± 0%   +5.82%  (p=0.002 n=6+6)
Referencer_Fmt_raw-2                   8.94µs ± 1%    8.94µs ± 0%     ~     (p=0.699 n=6+6)

name                                 old alloc/op   new alloc/op   delta
Mapper_Insert_single-2                 3.21kB ± 0%    3.21kB ± 0%     ~     (all equal)
Mapper_Insert_singleOmitempty-2        2.83kB ± 0%    2.83kB ± 0%     ~     (all equal)
Mapper_Insert_slice_heterogeneous-2    6.44kB ± 0%    6.44kB ± 0%     ~     (all equal)
Mapper_Insert_slice_homogeneous-2      4.72kB ± 0%    4.72kB ± 0%     ~     (all equal)
Mapper_Select_struct-2                 2.92kB ± 0%    2.92kB ± 0%     ~     (all equal)
Mapper_Select_ref-2                    5.30kB ± 0%    5.30kB ± 0%     ~     (all equal)
Referencer_Fmt_full-2                  9.13kB ± 1%   10.01kB ± 1%   +9.64%  (p=0.004 n=6+5)
Referencer_Fmt_lite-2                  4.56kB ± 0%    4.56kB ± 0%     ~     (all equal)
Referencer_Fmt_raw-2                   4.36kB ± 0%    4.36kB ± 0%     ~     (all equal)

name                                 old allocs/op  new allocs/op  delta
Mapper_Insert_single-2                   74.0 ± 0%      74.0 ± 0%     ~     (all equal)
Mapper_Insert_singleOmitempty-2          67.0 ± 0%      67.0 ± 0%     ~     (all equal)
Mapper_Insert_slice_heterogeneous-2       150 ± 0%       150 ± 0%     ~     (all equal)
Mapper_Insert_slice_homogeneous-2         109 ± 0%       109 ± 0%     ~     (all equal)
Mapper_Select_struct-2                   56.0 ± 0%      56.0 ± 0%     ~     (all equal)
Mapper_Select_ref-2                       121 ± 0%       121 ± 0%     ~     (all equal)
Referencer_Fmt_full-2                     152 ± 0%       136 ± 0%  -10.53%  (p=0.000 n=6+5)
Referencer_Fmt_lite-2                     102 ± 0%       102 ± 0%     ~     (all equal)
Referencer_Fmt_raw-2                     76.0 ± 0%      76.0 ± 0%     ~     (all equal)
Benchmark result
name                                 time/op
Mapper_Insert_single-2               8.15µs ± 1%
Mapper_Insert_singleOmitempty-2      7.32µs ± 1%
Mapper_Insert_slice_heterogeneous-2  16.5µs ± 1%
Mapper_Insert_slice_homogeneous-2    12.3µs ± 2%
Mapper_Select_struct-2               6.63µs ± 0%
Mapper_Select_ref-2                  13.0µs ± 0%
Referencer_Fmt_full-2                32.8µs ± 3%
Referencer_Fmt_lite-2                12.0µs ± 0%
Referencer_Fmt_raw-2                 8.94µs ± 0%

name                                 alloc/op
Mapper_Insert_single-2               3.21kB ± 0%
Mapper_Insert_singleOmitempty-2      2.83kB ± 0%
Mapper_Insert_slice_heterogeneous-2  6.44kB ± 0%
Mapper_Insert_slice_homogeneous-2    4.72kB ± 0%
Mapper_Select_struct-2               2.92kB ± 0%
Mapper_Select_ref-2                  5.30kB ± 0%
Referencer_Fmt_full-2                10.0kB ± 1%
Referencer_Fmt_lite-2                4.56kB ± 0%
Referencer_Fmt_raw-2                 4.36kB ± 0%

name                                 allocs/op
Mapper_Insert_single-2                 74.0 ± 0%
Mapper_Insert_singleOmitempty-2        67.0 ± 0%
Mapper_Insert_slice_heterogeneous-2     150 ± 0%
Mapper_Insert_slice_homogeneous-2       109 ± 0%
Mapper_Select_struct-2                 56.0 ± 0%
Mapper_Select_ref-2                     121 ± 0%
Referencer_Fmt_full-2                   136 ± 0%
Referencer_Fmt_lite-2                   102 ± 0%
Referencer_Fmt_raw-2                   76.0 ± 0%

@vearutop vearutop merged commit bbd477b into master Jun 19, 2023
@vearutop vearutop deleted the storage-of branch June 19, 2023 15:30
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