{"id":45576194,"url":"https://github.com/xraph/grove","last_synced_at":"2026-04-05T06:01:29.978Z","repository":{"id":340095581,"uuid":"1164270983","full_name":"xraph/grove","owner":"xraph","description":"A rethink of Database ORM","archived":false,"fork":false,"pushed_at":"2026-03-30T23:03:12.000Z","size":1113,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T04:15:40.859Z","etag":null,"topics":["go-orm","golang","golang-library","orm"],"latest_commit_sha":null,"homepage":"https://grove.xraph.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":"audit/audit.go","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-22T22:02:35.000Z","updated_at":"2026-03-30T22:54:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/xraph/grove","commit_stats":null,"previous_names":["xraph/grove"],"tags_count":137,"template":false,"template_full_name":null,"purl":"pkg:github/xraph/grove","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xraph%2Fgrove","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xraph%2Fgrove/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xraph%2Fgrove/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xraph%2Fgrove/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xraph","download_url":"https://codeload.github.com/xraph/grove/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xraph%2Fgrove/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31426193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T02:22:46.605Z","status":"ssl_error","status_checked_at":"2026-04-05T02:22:33.263Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go-orm","golang","golang-library","orm"],"created_at":"2026-02-23T09:55:35.758Z","updated_at":"2026-04-05T06:01:29.971Z","avatar_url":"https://github.com/xraph.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grove\n\nA polyglot Go ORM that generates native query syntax per database.\n\n## Features\n\n- **Native Query Syntax** -- Each driver generates queries in its database's native idiom\n- **Dual Tag System** -- `grove:\"...\"` tags with `bun:\"...\"` fallback for zero-cost migration\n- **Near-Raw Performance** -- Zero reflection at query time, pooled buffers, cached metadata\n- **Modular Migrations** -- Go-code migrations with multi-module dependency ordering\n- **Privacy Hooks** -- Pre/post query hooks for tenant isolation, PII redaction, and audit logging\n- **Streaming** -- Server-side cursor streaming with per-row hooks\n\n## Supported Databases\n\n- **PostgreSQL** -- Native `$1` placeholders, `DISTINCT ON`, `FOR UPDATE`, JSONB operators (also compatible with CockroachDB, Neon, Supabase)\n- **SQLite** -- Lightweight embedded database with `INSERT OR REPLACE`\n- **MySQL** -- Backtick quoting, `ON DUPLICATE KEY UPDATE`, `USE INDEX` hints (also compatible with TiDB)\n- **MongoDB** -- Native BSON filter documents, aggregation pipelines (also compatible with FerretDB)\n- **Turso / libSQL** -- Distributed SQLite at the edge with embedded replicas and multi-region replication\n- **ClickHouse** -- Columnar OLAP analytics with MergeTree engines, PREWHERE, SAMPLE, and batch inserts\n\n## Quick Start\n\n```go\n// Create and open the driver, then pass it to Grove\npgdb := pgdriver.New()\npgdb.Open(ctx, \"postgres://user:pass@localhost/mydb\", driver.WithPoolSize(20))\ndb, _ := grove.Open(pgdb)\n\n// Access the typed PG query builder via Unwrap\npg := pgdriver.Unwrap(db)\nvar users []User\nerr := pg.NewSelect(\u0026users).\n    Where(\"email ILIKE $1\", \"%@example.com\").\n    Where(\"role = $2\", \"admin\").\n    OrderExpr(\"created_at DESC\").\n    Limit(50).\n    Scan(ctx)\n```\n\n## Benchmarks\n\nAll benchmarks run on SQLite in-memory databases. No external services required.\n\nRun locally: `make bench`\n\n\u003c!-- BENCH:START --\u003e\n\u003e Benchmarks generated on 2026-02-22 with go1.25.7 on darwin/arm64. Each benchmark ran 5 times; values are averages.\n\n### Insert\n\n| Library | ns/op | B/op | allocs/op | vs Raw SQL |\n|---------|------:|-----:|----------:|-----------:|\n| Raw SQL | 4,015 | 880 | 20 | baseline |\n| Grove | 4,381 | 1,283 | 28 | +9.1% |\n| Bun | 8,459 | 5,470 | 27 | +110.7% |\n| GORM | 10,265 | 4,954 | 66 | +155.7% |\n\n### SelectOne\n\n| Library | ns/op | B/op | allocs/op | vs Raw SQL |\n|---------|------:|-----:|----------:|-----------:|\n| Raw SQL | 4,747 | 1,096 | 39 | baseline |\n| Grove | 5,575 | 1,458 | 34 | +17.4% |\n| Bun | 6,695 | 5,944 | 43 | +41.0% |\n| GORM | 8,070 | 4,383 | 81 | +70.0% |\n\n### SelectMulti\n\n| Library | ns/op | B/op | allocs/op | vs Raw SQL |\n|---------|------:|-----:|----------:|-----------:|\n| Raw SQL | 58,079 | 20,984 | 388 | baseline |\n| Grove | 45,686 | 23,413 | 584 | -21.3% |\n| Bun | 67,184 | 23,192 | 395 | +15.7% |\n| GORM | 83,217 | 28,570 | 765 | +43.3% |\n\n### Update\n\n| Library | ns/op | B/op | allocs/op | vs Raw SQL |\n|---------|------:|-----:|----------:|-----------:|\n| Raw SQL | 2,821 | 520 | 13 | baseline |\n| Grove | 3,617 | 1,010 | 21 | +28.2% |\n| Bun | 4,074 | 5,205 | 19 | +44.4% |\n| GORM | 5,468 | 4,020 | 49 | +93.8% |\n\n### Delete\n\n| Library | ns/op | B/op | allocs/op | vs Raw SQL |\n|---------|------:|-----:|----------:|-----------:|\n| Raw SQL | 3,479 | 232 | 8 | baseline |\n| Grove | 5,083 | 553 | 13 | +46.1% |\n| Bun | 5,147 | 4,880 | 12 | +47.9% |\n| GORM | 6,660 | 2,856 | 36 | +91.4% |\n\n### BulkInsert100\n\n| Library | ns/op | B/op | allocs/op | vs Raw SQL |\n|---------|------:|-----:|----------:|-----------:|\n| Raw SQL | 151,006 | 60,141 | 1524 | baseline |\n| Grove | 105,572 | 42,111 | 1421 | -30.1% |\n| Bun | 143,532 | 30,389 | 224 | -4.9% |\n| GORM | 187,914 | 93,706 | 1251 | +24.4% |\n\n### BulkInsert1000\n\n| Library | ns/op | B/op | allocs/op | vs Raw SQL |\n|---------|------:|-----:|----------:|-----------:|\n| Raw SQL | 1,401,957 | 605,384 | 16513 | baseline |\n| Grove | 967,190 | 409,753 | 14021 | -31.0% |\n| Bun | 1,359,612 | 408,694 | 2033 | -3.0% |\n| GORM | 1,782,186 | 894,166 | 12051 | +27.1% |\n\n### BuildSelect\n\n| Variant | ns/op | B/op | allocs/op |\n|---------|------:|-----:|----------:|\n| Grove | 453 | 864 | 11 |\n| Bun | 825 | 1,744 | 17 |\n\n### BuildInsert\n\n| Variant | ns/op | B/op | allocs/op |\n|---------|------:|-----:|----------:|\n| Grove | 842 | 930 | 19 |\n| Bun | 1,012 | 1,425 | 17 |\n\n### BuildUpdate\n\n| Variant | ns/op | B/op | allocs/op |\n|---------|------:|-----:|----------:|\n| Grove | 380 | 736 | 11 |\n| Bun | 597 | 1,184 | 14 |\n\n### SchemaCache\n\n| Variant | ns/op | B/op | allocs/op |\n|---------|------:|-----:|----------:|\n| CacheHit | 11 | 0 | 0 |\n| ColdStart | 3,123 | 3,728 | 75 |\n\n### TagResolution\n\n| Variant | ns/op | B/op | allocs/op |\n|---------|------:|-----:|----------:|\n| GroveTags | 3,101 | 3,728 | 75 |\n| BunFallback | 3,398 | 3,736 | 74 |\n\n\u003c!-- BENCH:END --\u003e\n\n## Documentation\n\nFull documentation available in the [docs](docs/) directory.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxraph%2Fgrove","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxraph%2Fgrove","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxraph%2Fgrove/lists"}