Skip to content

v1.40.0

Latest

Choose a tag to compare

@huandu huandu released this 20 Mar 12:53
· 2 commits to master since this release

What's new

Struct field / db tag improvements

Support treating a db tag on a struct-typed field as a database alias and expanding its exported fields as aliased columns. This makes it possible to build JOIN projections like post.id, post.title, etc., from a nested struct field and keeps Addr/Scan behavior working by allocating nested pointers when scanning.

Note: This change preserves existing semantics for scalar-like structs (types implementing sql.Scanner/driver.Valuer/time.Time, etc) — they are not expanded.

See issue #233 for more details.

Oracle SELECT behavior

Use OFFSET ... FETCH pattern for Oracle SELECT pagination.

Potential Oracle compatibility note: the change to use OFFSET ... FETCH for Oracle pagination may affect environments using older Oracle versions that do not support this syntax. Please verify compatibility with your Oracle version before upgrading.

Thanks and acknowledgements

Thanks to @zhangyongding for the Oracle pagination improvements.

Full Changelog: v1.39.0...v1.40.0