git404hub

what is gorp fr?

go-gorp/gorp — explained in plain English

Analysis updated 2026-06-26

3,756GoAudience · developerComplexity · 2/5Setup · easy

tl;dr

gorp is a Go library that maps your Go structs to SQL database tables, so you can insert, update, and fetch rows without writing repetitive boilerplate SQL for every operation.

vibe map

mindmap
  root((gorp))
    What it does
      SQL ORM helper
      Struct mapping
      Go database layer
    Features
      CRUD operations
      Lifecycle hooks
      Optimistic locking
      Transactions
    Databases
      PostgreSQL
      MySQL
      SQLite
    Use Cases
      Cut boilerplate SQL
      Fetch into structs
      Custom data hooks
    Status
      Low activity
      Best-effort maintenance

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Insert and fetch database rows by passing Go structs directly instead of writing raw SQL for every table

VIBE 2

Run arbitrary SQL queries and have the results automatically populated into a slice of structs

VIBE 3

Add pre- and post-operation hooks to run custom logic whenever a row is inserted, updated, or deleted

VIBE 4

Use optimistic locking with a version column to prevent two processes from overwriting each other's changes

what's the stack?

GoSQLSQLitePostgreSQLMySQL

how it stacks up fr

go-gorp/gorpoffchainlabs/prysmqax-os/elastichd
Stars3,7563,7553,755
LanguageGoGoGo
Setup difficultyeasyhardeasy
Complexity2/54/52/5
Audiencedeveloperops devopsops devops

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 30min

Development is low-activity and maintained on a best-effort basis, consider active alternatives for new projects.

License terms are not described in the README.

in plain english

gorp is a Go library that reduces the repetitive work of reading and writing data to a SQL database. When you build a Go application that needs to store data, you typically write a lot of similar code to convert between Go structs and database rows: insert this struct, update that one, fetch rows and populate these fields. gorp handles that conversion for you based on how your structs are defined. You connect gorp to a database using Go's standard database/sql package, then register your struct types and tell gorp which table each one maps to and which field is the primary key. After that, you can insert, update, delete, and fetch rows by passing struct values directly rather than writing raw SQL for every operation. Auto-incrementing primary keys are read back and set on the struct after an insert. You can also run arbitrary SQL queries and have the results bound into a slice of structs without manual type assertions. The library supports pre and post hooks on insert, update, and delete operations, which lets you run custom logic around data changes. There is optional optimistic locking using a version column, which prevents one process from overwriting changes made by another. Transaction support is included. The README also mentions optional SQL query logging for debugging. gorp works with several SQL databases by using dialect-specific configuration objects, so the same code can run against SQLite, PostgreSQL, MySQL, or others with minimal changes. The maintainers note in the README that development activity is low and the project is maintained on a best-effort basis, with pull requests merged occasionally. The library follows semantic versioning and supports the two most recent major versions of Go. It is available via standard Go module tooling.

prompts (copy fr)

prompt 1
Show me how to set up gorp with a PostgreSQL database in Go, register a User struct to a users table, and insert and fetch rows.
prompt 2
Help me write a gorp post-insert hook in Go that automatically sets a CreatedAt timestamp on my struct after every INSERT.
prompt 3
Explain how to use gorp's optimistic locking feature with a version column to prevent concurrent write conflicts in a Go app.
prompt 4
Show me how to run a custom SQL query with gorp and bind the results into a slice of Go structs without manual type assertions.

Frequently asked questions

what is gorp fr?

gorp is a Go library that maps your Go structs to SQL database tables, so you can insert, update, and fetch rows without writing repetitive boilerplate SQL for every operation.

What language is gorp written in?

Mainly Go. The stack also includes Go, SQL, SQLite.

What license does gorp use?

License terms are not described in the README.

How hard is gorp to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is gorp for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.