Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stephenafamo/bob
SQL query builder and ORM/Factory generator for Go with support for PostgreSQL, MySQL and SQLite
https://github.com/stephenafamo/bob
database golang hacktoberfest mysql orm postgres postgresql prisma psql query-builder sql sqlite sqlite3
Last synced: 30 days ago
JSON representation
SQL query builder and ORM/Factory generator for Go with support for PostgreSQL, MySQL and SQLite
- Host: GitHub
- URL: https://github.com/stephenafamo/bob
- Owner: stephenafamo
- License: mit
- Created: 2022-04-20T23:10:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-24T22:27:52.000Z (about 2 months ago)
- Last Synced: 2024-09-28T18:05:30.062Z (about 1 month ago)
- Topics: database, golang, hacktoberfest, mysql, orm, postgres, postgresql, prisma, psql, query-builder, sql, sqlite, sqlite3
- Language: Go
- Homepage: https://bob.stephenafamo.com
- Size: 1.92 MB
- Stars: 760
- Watchers: 9
- Forks: 39
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
- awesome-go - bob - SQL query builder and ORM/Factory generator for Go. Successor of SQLBoiler. (ORM / HTTP Clients)
README
# Bob: Go SQL Access Toolkit
[![Test Status](https://github.com/stephenafamo/bob/actions/workflows/test.yml/badge.svg)](https://github.com/stephenafamo/bob/actions/workflows/test.yml) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/stephenafamo/bob) [![Go Reference](https://pkg.go.dev/badge/github.com/stephenafamo/bob.svg)](https://pkg.go.dev/github.com/stephenafamo/bob) [![Go Report Card](https://goreportcard.com/badge/github.com/stephenafamo/bob)](https://goreportcard.com/report/github.com/stephenafamo/bob) ![GitHub tag (latest SemVer)](https://img.shields.io/github/v/tag/stephenafamo/bob) [![Coverage Status](https://coveralls.io/repos/github/stephenafamo/bob/badge.svg)](https://coveralls.io/github/stephenafamo/bob)
## Links
* [Documentation][docs]
* [Reference][reference]## About
Bob is a set of Go packages and tools to work with SQL databases.
Bob's philosophy centres around the following:
1. **Correctness**: Things should work correctly. Follow specifications as closely as possible.
2. **Convenience** (not magic): Bob provides convenient ways to perform actions, it does not add unexplainable magic, or needless abstraction.
3. **Cooperation**: Bob should work well with other tools and packages as much as possible, especially the standard library.**Bob** can be progressively adopted from raw SQL query strings, to fully typed queries with models and factories generated for your database.
## Components of Bob
**Bob** consists of several components that build on each other for the full experience.
1. Query Builder
1. SQL Executor for convenient scanning of results
1. Models for convenient database queries
1. Code generation of Models and Factories from your database schemaCheck out [the documentation][docs] for more information.
## Support
| | Queries | Models | ORM Gen | Factory Gen |
|---------------|---------|--------|---------|-------------|
| Postgres | ✅ | ✅ | ✅ | ✅ |
| MySQL/MariaDB | ✅ | ✅ | ✅ | ✅ |
| SQLite | ✅ | ✅ | ✅ | ✅ |
| Atlas | | | ✅ | ✅ |
| Prisma | | | ✅ | ✅ |## Comparisons
1. [Bob vs GORM](https://bob.stephenafamo.com/vs/gorm)
1. [Bob vs Ent](https://bob.stephenafamo.com/vs/ent)
1. [Bob vs SQLBoiler](https://bob.stephenafamo.com/vs/sqlboiler)
1. [Bob vs Jet](https://bob.stephenafamo.com/vs/jet)[docs]: https://bob.stephenafamo.com/docs
[reference]: https://pkg.go.dev/github.com/stephenafamo/bob