-
Notifications
You must be signed in to change notification settings - Fork 68
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 special type for scanning of unused columns (V1) #132
Conversation
Hi, thank you for this catch. Can I ask you to also add a test for this use case please? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## v1 #132 +/- ##
==========================================
- Coverage 82.81% 82.63% -0.18%
==========================================
Files 5 5
Lines 512 432 -80
==========================================
- Hits 424 357 -67
+ Misses 73 60 -13
Partials 15 15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@georgysavva done! |
@br3w0r, thank you for your contribution. I will go ahead and release a new version with this fix. |
* add noOpScanType * remove Value method * add test for scanning of unknown enum * fix tests * update db version * fix codecov * use token in codecov --------- Co-authored-by: Georgy Savva <georgy.savva@gmail.com>
The problem: at my job when we worked with custom enums there was a problem when a new custom enum wasn't yet added to a struct for scanning. It leaded to an error when
SELECT * FROM ...
was used:This problem occurs because the
interface{}
type obviously doesn't implement thesql.Scanner
interface. So, I added a new type that does the job and replaced theinterface{}
that was used for scanning of columns which wouldn't be used.