Skip to main content

Compatibility

ant hasn't reached 1.0, so anything can change between releases. Any release that changes behaviour will say so in its notes.

Go​

ant needs Go 1.27 or later, because its API uses generic methods. Each release supports the two newest Go versions, as Go itself does.

FeatureSinceUsed for
iter.Seq2Go 1.23Streaming with Each
new(expr)Go 1.26Nullable values, as in user.Bio = new("text")
Generic methodsGo 1.27Join[J], Include[R], Select[R] in fluent chains
Field selectors as struct literal keysGo 1.27User{ID: 1} for fields promoted from ant.Base

Databases​

DatabaseStatus
PostgreSQL 13 to 18Supported: the whole suite passes on each, as of 2026-11-01
MySQL 8.4, MariaDB 11.8, SQLite (modernc 1.61), SQL Server 2022Queries and writes: the conformance suite passes. No migrations

MERGE needs PostgreSQL 15. Everything else works from 13. ant runs on the pgx driver through database/sql. Another PostgreSQL driver may work, but pgxext needs pgx. See databases for what each one lacks.

From 1.0​

ant will follow semantic versioning: patch releases fix bugs, minor releases add to the API and change nothing that exists, and major releases can break things, with notes on how to move.

The API is:

  • Every exported name in the public packages, which a test keeps a record of.
  • The behaviour the documentation and tests/features describe.
  • The migration file format, and the history table.

The API isn't:

  • Anything under internal.
  • The exact SQL ant writes, which can change as long as it means the same.
  • The text of error messages. Match errors with errors.Is.
  • The dialect and qb packages, until a dialect outside this module exists to settle them.

Files that outlive a release​

Migrations and snapshots stay readable. A snapshot records its format, and a newer format is refused with a clear error, not misread. The history table only gains columns.

Upgrading​

  1. Read the notes for each release you cross.
  2. Update the module: go get github.com/skudra-go/ant@latest.
  3. Run go build ./.... A renamed or changed API fails here, which is the point of a typed one.
  4. Run your tests against a real database.
  5. Run go run ./cmd/migrate check. A release can change how a model maps to a schema, and this shows it.
  6. Run go run ./cmd/migrate drift against a staging database.