georgysavva / scany

Library for scanning data from a database into Go structs and more
MIT License
1.24k stars 67 forks source link

FR-72 - Allow to ignore unknown db colums #85

Closed talbSE closed 1 year ago

talbSE commented 2 years ago

this PR should resolve the issue mentioned here - https://github.com/georgysavva/scany/issues/72

allowing the user to pass in select * statements and ignoring the columns that doesnt exist in the destination struct

talbSE commented 1 year ago

@georgysavva heya .. thanks ! i added a test case for it , hope it does it.

codecov[bot] commented 1 year ago

Codecov Report

Merging #85 (c4424aa) into master (faa6baa) will increase coverage by 0.27%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
+ Coverage   86.87%   87.13%   +0.27%     
==========================================
  Files           5        5              
  Lines         335      342       +7     
==========================================
+ Hits          291      298       +7     
  Misses         33       33              
  Partials       11       11              
Flag Coverage Δ
unittests 87.13% <100.00%> (+0.27%) :arrow_up:

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

Impacted Files Coverage Δ
dbscan/dbscan.go 81.90% <100.00%> (+0.48%) :arrow_up:
dbscan/rowscanner.go 96.43% <100.00%> (+0.18%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us.

br3w0r commented 1 year ago

@georgysavva can you please create a tag for this release?

georgysavva commented 1 year ago

Here is the new release containing this feature: https://github.com/georgysavva/scany/releases/tag/v1.1.0 cc: @br3w0r, @talbSE