segmentio / ksuid

K-Sortable Globally Unique IDs
https://segment.com/blog/a-brief-history-of-the-uuid/
MIT License
4.96k stars 177 forks source link

tweaked scan method to work with most sql drivers // Added Must #44

Open juliankoehn opened 4 years ago

juliankoehn commented 4 years ago

Stripped the Scan method a 'lil bit. As i had problems to Scan with sqlx library. All tests pass.

=== RUN   TestScan
--- PASS: TestScan (0.00s)
=== RUN   TestValue
--- PASS: TestValue (0.00s)

UnmarshalText(), UnmarshalBinary()are no longer required for Scan.

TestSqlScanner() from ksuid_test.go is still implemented and PASS

--- PASS: TestSqlScanner (0.00s)
    --- PASS: TestSqlScanner/<nil> (0.00s)
    --- PASS: TestSqlScanner/string (0.00s)
    --- PASS: TestSqlScanner/[]uint8 (0.00s)

Same for TestSqlValuer() --- PASS: TestSqlValuer (0.00s)

rbranson commented 4 years ago

@achille-roussel going to leave this one to you :) LMK if you want anything from me on it.