Repository navigation
Releases
v0.3.1
Highlights
- Field lists and comparers are derived once and shared, instead re-building every time.
- Tracker entries, snapshots, insert rows, bound values and save nodes are now kept as blocks, instead of having an object per row.
- Integer and string keys are read directly once per row instead of using reflection.
- If an entity is unchanged, nothing is built for it on save now.
- SQL rendering got a bit of an overhaul, now using a pooled buffer where identifiers and placeholders are written to. Essentially a fast path for plain bound values.
- Each fields column is built once per model, so they are precomputed basically.
- A statement cache for Find, All/First/Single/Each with simple conditions and orderings
Benchmarks and other stuff too.
What's Changed
- Add 'See it' section to README by @borderss in #137
- perf: allocations improvements by @borderss in #139
Full Changelog: v0.3.0...v0.3.1
v0.3.0
Highlights
Probes are now pinned with runtime.Pinner, so field pointers stay valid even if Go's GC ever starts moving objects (#126). Thanks to Bjorn on Gophers Slack for giving me a pointer to this (ha ha ha).
The model registry, observers and keyring are read without locks now (#136) and there are parallel benchmarks to go with it now. This came out of a comment from AWildTyphlosion on r/golang about lock contention, thank you.
There's a set of agent skills in the repo (#128), so coding agents have something to go on instead of guessing, CI also got faster, tests run in parallel and the slow jobs are split (#123).
The rest is mostly correctness fixes around UpdatedAt, versions, filters, savepoints and migrations.
Breaking changes
- Global naming changes in #114. Probes should now be capitalized plural form of the model struct, e.g.
Users:
// In short, anywhere with U declared now becomes Users. Just a stylistic rename, not set in stone, but clearer pattern.
- U = ant.Fields[User]()
+ Users = ant.Fields[User]()
adults, err := db.Users.
- Where(ant.Gt(&U.Age, 18)).
- Include(&U.Posts).
+ Where(ant.Gt(&Users.Age, 18)).
+ Include(&Users.Posts).
All(ctx)
Eq(nil)andNe(nil)on expressions now match NULL (#116), so queries that relied on the old behaviour can return different rows.- In migrations, a column type change now fails instead of truncating values (#134).
What's Changed
- chore(deps): bump github.com/shopspring/decimal from 1.4.0 to 1.6.0 in the go-modules group across 1 directory by @dependabot[bot] in #59
- docs: correct ant.Values and Conflict.Where by @borderss in #69
- fix: forget a failed attempt's entities before a Tx retry by @borderss in #68
- fix: stamp UpdatedAt on forced updates by @borderss in #65
- fix(otel): name the database in db.system by @borderss in #66
- fix: refuse immutable, readonly and computed fields in explicit writes by @borderss in #67
- fix: global naming changes by @borderss in #114
- fix: make Expr Eq(nil) and Ne(nil) match NULL by @borderss in #116
- fix: apply Limit, Offset and Distinct to the rows SumOf, AvgOf, MinOf and MaxOf read by @borderss in #117
- fix: requalify related columns under functions and operators in Has and the Related helpers by @borderss in #118
- fix(validate): reject display names in Email and NaN in Range by @saromanov in #124
- ci: run tests in parallel and split the slow jobs by @borderss in #123
- docs: cleaning up the documentation a bit, adding a test for stored procedures by @borderss in #125
- fix: pin probes with runtime.Pinner by @borderss in #126
- fix: move the version on, stamp UpdatedAt and apply filters in UpdateMany by @borderss in #121
- fix: stamp UpdatedAt on an upsert's update branch by @borderss in #120
- fix: keep the joined model's filters on JoinUsing by @borderss in #119
- feat: adding agent skills by @borderss in #128
- fix: read model registry, observers and keyring without locks by @borderss in #136
- fix: let a type change fail instead of truncating values by @borderss in #134
- fix: start a new identity after the column's existing values by @borderss in #133
- fix: match an explicitly named default schema in drift and EnsureCreated by @borderss in #132
- fix: run a Touch relation's parent update in the write's transaction by @borderss in #130
- fix: open a savepoint when Begin runs inside a transaction by @borderss in #131
- ci: run the nested modules' tests in make test and CI by @borderss in #129
New Contributors
- @saromanov made their first contribution in #124
Full Changelog: v0.2.0...v0.3.0
v0.2.0
What's Changed
- Bulk writes fix for queries with derived sources to not update/delete outside the query scope by @borderss in #2
- comment and hint validations and cleanup for safety by @borderss in #12
- changes to support identifying column replaces and making re-building… by @borderss in #13
- keep versions moving on upserts, InsertMany conflicts and merges by @borderss in #15
- set members keep their own ordering and paging by @borderss in #16
- validate rename targets against models and snapshot by @borderss in #17
- test matrix with an oracle, sql snapshots and fuzzing by @borderss in #28
- wrap write subqueries that read their own table on mysql by @borderss in #20
- bind every time shape in UTC on databases without zones by @borderss in #19
- antvet false positives on aliases, configured keys and subqueries by @borderss in #18
- fix(postgres): support scanning Infinity coordinates in Point.Scan by @duongynhi000005-oss in #54
- Return named errors for unsupported embedded fields by @imshah-id in #55
- concurrency claims for tracking contexts and single-write includes by @borderss in #14
- fixes for issues described in issue 21 by @borderss in #56
- ci: move to github flow on main, add community files and trim docs by @borderss in #57
- chore(deps): bump the go-modules group across 1 directory with 2 updates by @dependabot[bot] in #58
New Contributors
- @duongynhi000005-oss made their first contribution in #54
- @imshah-id made their first contribution in #55
- @dependabot[bot] made their first contribution in #58
Full Changelog: v0.1.0...v0.2.0
v0.1.0
Initial package. Not yet production ready.
Full Changelog: https://github.com/skudra-go/ant/commits/v0.1.0