Skip to content

LiteORM documentation

LiteORM is a Go data-access library with two front-ends over one CGo-free core: an explicit, generics-first query builder and a declarative, convention-driven orm. Both run against the same backends, the same transaction, and the same normalized errors — so you use orm for CRUD and drop to query for a hot path on the same connection without changing libraries.

New here? Start with Getting started, and if you’re unsure which front-end to reach for, read Query or ORM? — the one decision that shapes everything else. Coming from gorm? Map what you know in Coming from gorm. Coding with an AI assistant? Set it up with AI agents & skills so it writes correct LiteORM from the start.

  • Transactions — closure helpers, retry, savepoints, and queryorm interop on one transaction.
  • Errors — normalized sentinels that are the same on every backend.
  • Field codecs — transform a field on read/write without changing its Go type.
  • Context & session — the Session both *DB and a transaction satisfy, and context on every call.
  • Statement logging · Observability — trace, meter, or audit every statement.
  • Postgres — LISTEN/NOTIFY and typed JSONB / array operators.
  • Backends — opening each backend and the capability matrix; Dialects — placeholders, quoting, feature flags, quirks.
  • Studio — the embedded browser admin GUI with built-in AI, mounted as an http.Handler.
  • AI agents & skills — set up your assistant with the shipped Agent Skills.

LiteORM ships first-class support for AI coding assistants — see AI agents & skills for the full setup. In short: if you’re an assistant building with LiteORM, load the task recipes in skills/; if you’re working inside this repository, read AGENTS.md.