upper/db puts seven data sources behind one Go interface and keeps its examples off the README
Data Access Layer (DAL) for PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB with ORM-like features.
At a glance
- What is it?
- upper/db is a Go data access layer for PostgreSQL, MySQL, MSSQL, CockroachDB, MongoDB, QL and SQLite. This article covers the module path, the driver set, the release gap and where the actual usage examples live.
- Who is it for?
- upper/db suits Go developers who want one query interface across several databases, SQL and MongoDB included, and who accept learning it from upper.io/v4 and the tour. It is a poor fit if you want examples in the repository or a recent tagged release to pin.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 48 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.
Star history
- upper/db3,661 ★ · +0
| Repository | 2026-11-03 | 2026-11-23 |
|---|---|---|
| upper/db | 3.7k | 3.7k |
0 Stars in the last 20 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
One data access layer for seven sources, from PostgreSQL to MongoDB
upper/db calls itself a productive data access layer (DAL) for Go that provides agnostic tools to work with different data sources. The front page names seven: PostgreSQL, MySQL, MSSQL, CockroachDB, MongoDB, QL and SQLite. Each links to its own adapter page under upper.io/v4/adapter.
The repository description is shorter. It lists PostgreSQL, CockroachDB, MySQL, SQLite and MongoDB, and adds the phrase ORM-like features. MSSQL and QL appear only in the README list, so a reader who judges the project from the GitHub description alone will think two supported sources do not exist.
The interesting design claim is the mix. Relational databases and a document store sit behind the same layer, which is a different bet from a library that targets SQL alone. The front page does not say which operations behave the same across all seven. Check the adapter page for your database before assuming a query you write for PostgreSQL will run unchanged against MongoDB.
The module path ends in /v4 and the Go floor is 1.23.0
The README prints no install command, so none is invented here. What the repository does show is the module declaration in go.mod: module github.com/upper/db/v4, with go 1.23.0 and toolchain go1.23.2. Import paths therefore carry the /v4 suffix, and a project on an older Go release cannot use the current code.
The v4 in the path matches the documentation URL, upper.io/v4, so the docs and the module track the same major version. A reader following an older tutorial for a previous major version will meet different import paths.
The Go version requirement is the one hard compatibility fact in the front matter. Nothing in the repository names a minimum for any database server version, a supported operating system or a CPU architecture, so those checks fall to you and to the driver you pick. Start from the adapter page for your database.
Every adapter carries its own driver, and PostgreSQL pulls in two
go.mod lists the drivers the project builds on. PostgreSQL goes through github.com/jackc/pgx/v5 v5.7.2 and github.com/jackc/pgtype v1.14.4, with github.com/lib/pq v1.10.9 also required. MySQL uses github.com/go-sql-driver/mysql v1.9.0. MSSQL uses github.com/denisenkom/go-mssqldb v0.12.3. SQLite uses github.com/mattn/go-sqlite3 v1.14.24. MongoDB uses go.mongodb.org/mongo-driver v1.17.3, and QL uses modernc.org/ql v1.4.11.
There is one module, one go.mod, and one dependency list holding all of them, plus an indirect pgx/v4 v4.18.3 and many supporting entries. The list is longer than any single database needs. A security scanner reading go.mod will report on drivers for databases you never connect to.
Because the project wraps these drivers, driver bugs and version choices come with the wrapper. Which of the two PostgreSQL drivers serves which code path is not described on the front page.
ORM-like features is a description, and the README never shows what they are
The repository description says ORM-like features. The README never expands on that. There is no code block, no query example and no mention of struct mapping or migrations. The root directory only suggests the shape of the API through file names: collection.go, result.go, record.go, store.go, session.go, cond.go, comparison.go, raw.go, union.go, intersection.go, iterator.go and marshal.go, plus sql.go and clauses.go.
Those names tell you the vocabulary, not the behaviour. Do not assume schema migrations or relationship loading from the words ORM-like, because neither is mentioned anywhere in the front page. If you need either, find it in the documentation at upper.io/v4 first.
The practical cost is evaluation time. Judging the library means leaving GitHub, reading the docs and running the tour, not skimming the repository. A team deciding quickly will find nothing here to decide on.
No tag since v4.10.0 in March 2025, though the repository was pushed in October 2026
The recent tagged releases are v4.10.0 on 9 March 2025, v4.9.0 on 8 September 2024 and v4.8.0 on 23 June 2024. The repository is not archived, and the last push to master was on 6 October 2026.
The gap matters. Commits made after v4.10.0 exist on master but are in no tag, so go get at the tag gives you March 2025 code, while pointing at master gives you something nobody has labelled. The front page does not explain what changed since the tag or whether a v4.11 is planned.
The facts here support one statement about upkeep: there was a push in October 2026. They do not support calling the library maintained in the sense of regular releases, because the last three releases are about six to nine months apart, and the latest is now much older than that interval. Pin a tag, and read the commit log for what you would miss.
The Makefile sets UPPER_DB_LOG to ERROR and runs the test suite from tests/
The Makefile begins with UPPER_DB_LOG ?= ERROR and exports it, so logging is quiet unless the variable is set differently in your environment. Because the assignment uses ?=, a value you already have exported wins. The name suggests a log level, but the front page does not list the other accepted values.
Two targets exist. The bench target runs the benchmarks under internal/:
go test -v -benchtime=500ms -bench=. ./internal/...The test target runs make inside the tests/ directory, which holds the integration suite. The repository also has comparison_test.go, cond_test.go and function_test.go at the root. The Makefile does not set up a database server, so running the tests against PostgreSQL or MongoDB needs those servers available. How to start them is not described in the files shown, and a contributor has to look at the tests/ directory for that.
Documentation and live examples sit at upper.io/v4 and tour.upper.io
The README is short. It points to upper.io/v4 for documentation and code samples, and to tour.upper.io for a tour with real live examples in the browser. The tour is the only place the front page promises runnable code.
This is the real onboarding path. Someone arriving from the repository gets a module path, a list of sources and two links. Anything about connecting, querying or handling errors is on the external site, which can drift from the code in the repository without any notice in a pull request.
Licensing is MIT, via the LICENSE file. Contributors are listed on the GitHub contributors graph rather than in a file. There is also a publish-policy.json at the root, which the front page does not describe. The homepage listed for the project is upper.io.
Editorial conclusion
upper/db suits Go developers who want one query interface across several databases, SQL and MongoDB included, and who accept learning it from upper.io/v4 and the tour. It is a poor fit if you want examples in the repository or a recent tagged release to pin. Before adopting, check whether the adapter page for your database covers the operations you need, and decide whether v4.10.0 from March 2025 is acceptable as the pinned version.
Frequently asked questions
Which databases does upper/db support?
The README lists PostgreSQL, MySQL, MSSQL, CockroachDB, MongoDB, QL and SQLite. Each has an adapter page under upper.io/v4/adapter.
What Go version does upper/db need?
go.mod declares go 1.23.0 with toolchain go1.23.2, and the module path is github.com/upper/db/v4.
Where are the upper/db documentation and examples?
Documentation and code samples are at upper.io/v4. A browser tour with live examples is at tour.upper.io. The README itself contains no code samples.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/upper-db)Star history chart for your README
[](https://hysenlabs.com/projects/upper-db)Was this useful?