gorp
I hesitate to call gorp an ORM. Go doesn't really have objects, at least not in the classic Smalltalk/Java sense. There goes the "O". gorp doesn't know anything about the relationships between your structs (at least not yet).
Cost / License
- Free
- Open Source
Platforms
- Go (Programming Language)
- Self-Hosted
gorp
Features
- Command line interface
- Golang
Tags
- go-lang
- go-library
- relational
gorp News & Activities
Recent activities
gorp information
What is gorp?
I hesitate to call gorp an ORM. Go doesn't really have objects, at least not in the classic Smalltalk/Java sense. There goes the "O". gorp doesn't know anything about the relationships between your structs (at least not yet). So the "R" is questionable too (but I use it in the name because, well, it seemed more clever).
The "M" is alive and well. Given some Go structs and a database, gorp should remove a fair amount of boilerplate busy-work from your code.
I hope that gorp saves you time, minimizes the drudgery of getting data in and out of your database, and helps your code focus on algorithms, not infrastructure.
- Bind struct fields to table columns via API or tag
- Support for embedded structs
- Support for transactions
- Forward engineer db schema from structs (great for unit tests)
- Pre/post insert/update/delete hooks
- Automatically generate insert/update/delete statements for a struct
- Automatic binding of auto increment PKs back to struct after insert
- Delete by primary key(s)
- Select by primary key(s)
- Optional trace sql logging
- Bind arbitrary SQL queries to a struct
- Bind slice to SELECT query results without type assertions
- Use positional or named bind parameters in custom SELECT queries
- Optional optimistic locking using a version column (for update/deletes)