finds.dev← search

// the find

go-xorm/xorm

★ 6,628 · Go · BSD-3-Clause · updated Apr 2020

Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,mssql,oracle, Moved to https://gitea.com/xorm/xorm

xorm is a Go ORM that supports MySQL, Postgres, SQLite, MSSQL, TiDB, and Oracle. It sits between GORM and raw database/sql in terms of abstraction — chainable query API, schema sync, and read/write splitting built in. This GitHub repo is a dead mirror; active development moved to Gitea in 2020.

The EngineGroup with automatic read/write splitting is genuinely useful for replica setups without any application-level routing code. Schema sync via Sync2 is practical for rapid prototyping — it applies struct changes to the DB without requiring a formal migration file. The context cache (per-session in-memory dedup) is a smart pattern for avoiding redundant queries within a single request. Broad dialect coverage including TiDB and Oracle is rare at this level of the Go ecosystem.

The GitHub repo has been abandoned since April 2020 — any bugs, CVEs, or Go version compatibility issues get fixed only on Gitea, so you're on a stale fork if you import from github.com/go-xorm/xorm. Sync2 is dangerous in production: it modifies live schema based on struct state, which means a typo or field rename silently drops a column. No real migration system — the migrate/ subdirectory is a thin wrapper, not a versioned migration tool like goose or Atlas. Oracle support is explicitly experimental and depends on go-oci8, which requires CGO and an Oracle client install, making it effectively unusable in most CI/container environments.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →