• Sources: primary, discussion
  • Summary: ant maintainer Alberts Liepins explains that queries name columns as pointers to fields of a per-model probe struct, and the library maps each address back to a column by offset and static type in about 21 ns, pinning probes with runtime.Pinner in case Go's collector ever moves objects. Go 1.27 generic methods let chained calls such as OrderBy and Include take their own type parameters, which earlier versions only allowed on package-level functions. Some mistakes still compile, such as a condition on another model, and a go vet analyzer called antvet catches several of them.
  • Why it matters: Go 1.27 generic methods make fluent, type-checked query builders possible without a schema DSL or a code generation step.