Tarun Vishwakarma

Gormicx

Role
Database & Programming
Stack
Go, SQL, NoSQL

One ORM, every database: a minimal-footprint ORM for Go with a single interface over SQL and NoSQL stores.

Gormicx documentation site

How it’s built

Engine and query builder
Goroutine-safe. The builder is fluent and immutable: every method returns a new query.
Drivers
Implement one interface (open, close, ping, create, find, update, delete, raw, migrate, stats; transactions optional) and register themselves on import.
Schema
Structs are parsed once by reflection and cached in a sync.Map.
Packages
clause, driver, logger, pool, schema, and drivers for postgres, mysql, mongo, cassandra and snowflake.

What it does

  • Every operation takes a context.Context.
  • Where clauses for equality, comparison, IN, LIKE, null checks, BETWEEN and AND / OR / NOT, plus ordering, grouping, joins, counts and raw queries.
  • Lifecycle hooks before and after create, update, delete and find, at engine or model level.
  • Transactions on SQL drivers, rolled back automatically on panic.
  • Batch create and delete, auto-migration from struct definitions, a dry-run mode that logs without executing, and soft deletes.
  • Connection pool options and stats, a pluggable logger and a configurable naming strategy.

Screens

Docs: getting started
Docs: open a connection and define a model
Docs: drivers, one per database

Where it sits

Go · pgx v5 · go-sql-driver/mysql · mongo-driver · gocql · gosnowflake

By the numbers

Databases
7: PostgreSQL, CockroachDB, MySQL, MariaDB, MongoDB, Cassandra, Snowflake
Driver packages
5
Hook types
8
Sentinel errors
10

Get it

Stratus KeyboardProduct landing pageNext project