Releases: blockloop/scan
Releases · blockloop/scan
v2.5.0
What's Changed
- Added support for custom columns names mapper functions by @mzahradnicek in #70
New Contributors
- @mzahradnicek made their first contribution in #70
Full Changelog: v2.4.0...v2.5.0
v2.4.0
What's Changed
- fix: Columns and Values should recognize Slice values too by @max-stytch in #68
Full Changelog: v2.3.0...v2.4.0
v2.3.0
What's Changed
- Bump golang.org/x/text from 0.9.0 to 0.12.0 by @dependabot in #64
- Bump github.com/proullon/ramsql from 0.0.0-20181213202341-817cee58a244 to 0.0.1 by @dependabot in #58
- fix: Columns and Values should recognize pointer values too by @taronish-stytch in #67
Full Changelog: v2.2.1...v2.3.0
v2.2.1
What's Changed
- fix: Allow valid sql types to be used by Columns and Values by @taronish-stytch in #63
New Contributors
- @taronish-stytch made their first contribution in #63
Full Changelog: v2.2.0...v2.2.1
v2.2.0
What's Changed
- fix: Use model.Type() as cache key instead of model itself by @max-stytch in #62
New Contributors
- @max-stytch made their first contribution in #62
Full Changelog: v2.1.0...v2.2.0
v2.1.0 nested structs for columns and values
What's Changed
- Implement nested structs for columns and values by @ricci2511 in #60
- Bump golang.org/x/text from 0.7.0 to 0.8.0 by @dependabot in #51
- Bump golang.org/x/text from 0.8.0 to 0.9.0 by @dependabot in #53
New Contributors
- @ricci2511 made their first contribution in #60
Full Changelog: v2.0.1...v2.1.0
v2.0.1
Nested Struct Scanning
This release adds the ability to scan to a nested struct.
rows, err := db.Query(`
SELECT person.id,person.name,company.name FROM person
JOIN company on company.id = person.company_id
LIMIT 1
`)
var person struct {
ID int `db:"person.id"`
Name string `db:"person.name"`
Company struct {
Name string `db:"company.name"`
}
}
err = scan.RowStrict(&person, rows)
err = json.NewEncoder(os.Stdout).Encode(&person)
// Output:
// {"ID":1,"Name":"brett","Company":{"Name":"costco"}}