Skip to content

dbmeta v0.1.0

Choose a tag to compare

@kenshaw kenshaw released this 02 Oct 01:22
· 21 commits to main since this release

The first release of dbmeta. It reads the metadata of a database, such as its
schemas, tables, columns, indexes, constraints, functions and roles, with one
API for every database. usql and dbtpl read through it.

go get github.com/xo/dbmeta@v0.1.0

The module depends on the standard library alone and uses no cgo. The caller
opens the connection with the driver of its choice and passes it in.

What it answers

There are 34 models, one for each database, and the shape of every answer
follows the metadata commands of psql. PostgreSQL answers all 56 kinds of
object. The other models answer what their catalog holds, and
Query.Support says which kinds each one answers.

The models are for PostgreSQL, CockroachDB, MySQL and MariaDB, TiDB, Vitess,
SingleStore, SQLite, libSQL, rqlite, DuckDB, SQL Server, Oracle, Cassandra and
ScyllaDB, ClickHouse, Trino, Presto, Firebird, SAP HANA, Apache Hive, Apache
Impala, Exasol, Vertica, Couchbase, CrateDB, QuestDB, Databend, Snowflake,
Amazon Redshift, InfluxDB 3, InfluxDB 1 and 2 through InfluxQL, Neo4j, YDB,
ArangoDB and SurrealDB. A shared model reads a standard information_schema.

docs/COVERAGE.md holds what each database answers, and why it does not answer
the rest.

How it was tested

Every release of a database sits in a tier, and README.md names the tier of
each one.

  • The Tested tier ran in CI on the commit before this tag, 380e597, and
    passed.
  • The Nightly tier passed on 3a0ff0f, the night before this release.
  • The Verified tier runs only on a development machine, and it was not run
    again for this release. It holds Exasol, SQL Server releases on Windows
    machines, and Oracle 18c and 19c.
  • The Snowflake and Redshift models were written from the vendors'
    documentation and have never run against a server.

Before v1

This is a v0 release, so the API can still change. The decisions behind every
part of it are in docs/decisions/.