Go · since 2026

Grove

An ORM that emits each database’s own dialect instead of a lowest common denominator: DISTINCT ON and JSONB operators on Postgres, ON DUPLICATE KEY UPDATE on MySQL, BSON aggregation pipelines on Mongo, PREWHERE and SAMPLE on ClickHouse. On the insert benchmark it runs about 9% over raw database/sql, against 111% for Bun and 156% for GORM.

Language
Go
Category
ORM
Since
2026
Stars
4
In production
01+
Repository Docs
01

Highlights

3 claims
H.01
Sevendrivers
One model registry

Postgres, MySQL, SQLite, MongoDB, Turso, ClickHouse and Elasticsearch, each generating its own native syntax while sharing the registry and the hook engine.

H.02
Zeroreflection
On the hot path

Cached field offsets and pooled buffers, so the abstraction costs close to nothing once the query is built.

H.03
Offline-first
CRDTs in the ORM

LWW-Register, PN-Counter and OR-Set converge without coordination, so distributed nodes can write independently.

02

In production

1 named · more on the way

Shipping something on Grove? The list is only as complete as the people who tell me. Ask to be on it, or just say what got in your way.

Get listed
03

What it does

7 entries

One ORM across seven databases, written so the abstraction does not become the cost.

03.1
Polyglot

Native syntax per database

A dual grove and bun tag system generates each database its own query shape. The hot path avoids reflection entirely, caching field offsets and pooling buffers to stay near raw driver speed.

Zero reflection
03.2
CRDT

Convergence without coordination

LWW-Register, PN-Counter and OR-Set resolve their own conflicts, so nodes that were offline can merge when they return.

Offline-first
03.3
Key-value

Five backends, one keyspace model

Redis, Memcached, DynamoDB, BoltDB and Badger behind composable middleware for logging, metrics and circuit breaking.

Middleware
03.4
Multi-database

Named connections through DI

DBManager and Vessel resolve named connections, so Postgres, ClickHouse and SQLite can be live in one process with their own hooks and migrations.

Vessel
03.5
Privacy

Hooks before every query

Tenant isolation and PII redaction attach as hooks that run ahead of each query and mutation, which keeps authorisation logic out of the ORM itself.

Audit
03.6
Streaming

A lazy generic iterator

Stream[T] pulls one row at a time, composes through Map, Filter, Chunk and Reduce, and works with range-over-func. ChangeStream adds change data capture on top.

CDC
03.7
Migrations

Ordered by dependency

Migrations are Go code ordered by what they depend on, so Forge extensions can ship their own and have them compose across modules.

Modular
04

Drivers

Seven, plus five key-value

Each generates native syntax while sharing the model registry, the hook engine and the migration ordering.

04.01

PostgreSQL

The reference driver. Everything else is measured against what this one does.

Relational
04.02

MySQL

Native syntax generation with the same model registry and hooks.

Relational
04.03

SQLite

The development and embedded target, and what the test suite runs against.

Embedded
04.04

MongoDB

Document queries through the same builder the relational drivers use.

Document
04.05

Turso

SQLite semantics over a replicated edge deployment.

Edge
04.06

ClickHouse

Columnar reads for the analytical side of a mixed workload.

Columnar
04.07

Elasticsearch

Search-shaped queries sharing the registry with the rest.

Search
04.08

Redis

Key-value with keyspaces for logical separation.

Key-value
04.09

Memcached

Key-value where the cache is expected to be lossy.

Key-value
04.10

DynamoDB

Key-value against a managed store, behind the same middleware chain.

Key-value
04.11

BoltDB

Embedded key-value in the process, with no network hop.

Embedded
04.12

Badger

Embedded key-value tuned for write throughput.

Embedded
05

Anatomy

4 modules
01

Dialects

Postgres, MySQL, SQLite, MongoDB, Turso and ClickHouse behind one API.

02

Migrations

Modular, per-module, ordered by dependency.

03

Privacy hooks

Field-level rules applied at the store, not at the caller.

04

Streaming

Large result sets read without loading them.

06

Why it exists

Design notes

#What it is

Grove is a polyglot Go ORM that generates each database's native query syntax rather than a portable subset. The common core handles connections, cached metadata, migrations, hooks and streaming; each driver exposes a builder that speaks its own dialect.

#Supported databases

  • PostgreSQL: $1 placeholders, DISTINCT ON, FOR UPDATE, JSONB operators. Also CockroachDB, Neon and Supabase.
  • MySQL: backtick quoting, ON DUPLICATE KEY UPDATE, USE INDEX hints. Also TiDB.
  • SQLite: INSERT OR REPLACE.
  • MongoDB: native BSON filter documents and aggregation pipelines. Also FerretDB.
  • Turso / libSQL: embedded replicas and multi-region replication.
  • ClickHouse: MergeTree engines, PREWHERE, SAMPLE, batch inserts.

#Performance

On the insert benchmark (SQLite in-memory, go1.25.7, darwin/arm64, five runs averaged):

  • Raw database/sql: 4,015 ns/op, 880 B/op, 20 allocations
  • Grove: 4,381 ns/op, 1,283 B/op, 28 allocations, about 9 per cent over raw
  • Bun: 8,459 ns/op, 5,470 B/op, 27 allocations, about 111 per cent over raw
  • GORM: 10,265 ns/op, 4,954 B/op, 66 allocations, about 156 per cent over raw

The mechanism is that struct metadata is resolved once at registration and cached, so the query path walks a prepared description rather than the reflect API, with pooled buffers. Against a network round trip to a real database these differences are noise; they matter on bulk paths and inside Fabriq, where per-command overhead is multiplied by a fan-out.

#Other pieces

  • Dual tags: bun:"..." is read as a fallback when grove:"..." is absent, so a Bun codebase can adopt Grove without touching its models.
  • Modular migrations: written in Go, with dependency ordering across modules, which is what a plugin-shaped application needs.
  • Privacy hooks: pre and post query hooks for tenant isolation, PII redaction and audit logging.
  • Streaming: server-side cursors with per-row hooks.
07

Signals

GitHub
Stars
4
Language
Go
Since
2026
Adopters
01