fusion-orm
A Go ORM that pairs a SQL-first query engine with a fluent chaining API. Built on database/sql — SQLite and PostgreSQL dialects included.
go get github.com/kiplagatcollins/fusion-orm
modelwhereorderlimitreturning→ BuildClauses → []byte
chain
db.Model(&User{}).
Where("age > ?", 18).
Order("id DESC").
Limit(5).
Find(&users)SQL
SELECT * FROM "users"
WHERE age > $1
ORDER BY id DESC
LIMIT 5Everything in the box
- Batched nested Preload — one query per relation, no N+1
- Inline Joins with dotted alias__column scanning
- Association API: Find, Append, Replace, Delete, Clear, Count
- Soft delete with Unscoped and Restore
- Transactions, savepoints, nested rollback
- Prepared statements: LRU + TTL cache
- AutoMigrate + versioned Go and SQL migrations
- Sentinel errors with driver constraint translation
- Query hooks, slog adapter, slow-query tracing
- Composite primary keys with row-value keysets
- Generics facade G[T] — same SQL, typed results
- ToSQL and DryRun: always see the statement