# go-gorp/gorp

Go Relational Persistence - an ORM-ish library for Go

Repository: https://github.com/go-gorp/gorp
Canonical: https://ross.abutalabs.com/products/gorp
Language: Go
License: MIT
License Family: permissive
Last push: 2024-11-19T16:27:48+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 5355, "days_push": 652, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3747, forks 381 (observed 2026-08-28T04:08:16.145604+00:00)

## What it is
gorp is a Go library that maps Go structs to relational database tables, generating insert/update/delete SQL and binding query results back to structs. It is a lightweight 'ORM-ish' layer over database/sql that reduces boilerplate without full object-relational mapping.

## Use cases
- map Go structs to database tables without writing CRUD SQL
- run transactions with rollback support in Go
- load SELECT query results directly into struct slices
- forward-engineer a database schema from structs for unit tests
- add optimistic locking with a version column
- hook pre/post insert, update, and delete logic

## When to choose
- you use database/sql and want less boilerplate without a full ORM
- you want explicit control over SQL while getting struct binding for free
- you need simple transactions, hooks, and optimistic locking in Go

## When to avoid
- you need relationship/association management between entities
- you want automatic migrations or a rich query DSL
- you need a very actively developed project with frequent releases

## Facets
- artifact type: library
- maturity: maintenance
- function: orm, database, database-driver
- domain: databases, backend, developer-tools
- platform: go, cross-platform
- tags: sql, struct-mapping, transactions, relational-database

## Member repositories
- go-gorp/gorp (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:16.145604+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:29:02.446841+00:00, confidence not recorded.
  - readme: https://github.com/go-gorp/gorp (fetched 2026-08-28T04:08:16.145604+00:00, sha fcb9d2b08a67)
- Data as of 2026-08-30T08:39:29.467469+00:00.
