Skip to content

Latest commit

 

History

42 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Unit Tests Go Reference Releases Discord Discussion

dbimp

dbimp holds Go database/sql drivers for databases that have no idiomatic Go driver, and for groups of databases that can share one implementation. usql and dbtpl use them. The first drivers are for databases that take queries over HTTP. The drivers use the Go standard library, with apd for decimals, and need no cgo.

The repository is new. It holds the drivers couchbase, which was first released in v0.1.0, surrealdb and neo4j, which the tags v0.2.0 and v0.3.0 hold, influxdb, which was first released in v0.4.0 with the other three, arangodb, which was first released in v0.5.0, databend, which was first released in v0.6.0, pinot, which was first released in v0.7.0, rqlite, which was first released in v0.8.0, and libsql, which was first released in v0.9.0, and avatica, which was first released in v0.10.0. docs/TARGETS.md names the databases it aims to support, and the order of the work.

Use

Each driver is its own package, and there is no package that imports every driver. Import the driver for your database. Open it with the name of the database, and with a URL whose scheme is that name:

import (
	"database/sql"

	_ "github.com/xo/dbimp/couchbase"
)

db, err := sql.Open("couchbase", "couchbase://user:pass@localhost:8093/")

A driver registers one name and knows no alias. dburl turns an alias, such as n1ql, into the URL that the driver reads, so every alias works in usql.

Documents

Document Holds
CONTRIBUTING.md How to change this repository
AGENTS.md The rules, written for a coding agent. They apply to a person too
CLAUDE.md One line that imports AGENTS.md for Claude Code
docs/PLAN.md The purpose of the project, and the open questions
docs/decisions/README.md Every decision, one file each, and their index
docs/TARGETS.md Every target database, its priority, and the review of the list
docs/DRIVER.md Every step to add a driver, in order
docs/TYPES.md The kinds of type, the Go type of each, and the types of every driver
docs/DESIGN.md The design of the code that every driver shares
docs/COUCHBASE.md What is measured about the Couchbase query service
docs/SURREALDB.md What is known about the HTTP interface of SurrealDB
docs/NEO4J.md What is known about the HTTP interface of Neo4j
docs/AVATICA.md What is known about Apache Calcite Avatica and the Phoenix Query Server, measured for its driver
docs/INFLUXDB.md What InfluxDB 1, 2 and 3 answer, as measured on seven releases
docs/CRATEDB.md What is known about CrateDB, and why it has no driver here
docs/ARANGODB.md What ArangoDB 3.12 answers, as measured
docs/DATABEND.md What Databend 1.2.881 and 1.2.948 answer, as measured
docs/TDENGINE.md What TDengine answers, as measured, and why it has no driver here
docs/PINOT.md What Apache Pinot 1.4.0 and 1.5.1 answer, as measured
docs/RQLITE.md What is known about rqlite, measured for its driver
docs/LIBSQL.md What is known about libSQL and Turso, measured for its driver
docs/BACKLOG.md The planned work, in order

Related projects

dbimp is one of the xo projects for databases. Each one is a separate repository:

Project What it is
usql A command line client for SQL and NoSQL databases, modeled on psql. It uses the drivers of dbimp
dburl Parses the URL of a database, and names the driver that opens it. It gives each driver of dbimp its DSN
dbmeta Reads the metadata of a database: its schemas, tables, columns and the rest. Its command dbrun starts the servers that the tests of dbimp use
dbtpl Generates Go code from the schema of a database. It reads the schema through dbmeta
dbimp This repository: database/sql drivers for databases that have no idiomatic Go driver
cql The database/sql driver for Cassandra
tblfmt Writes a result set as a text table, one row at a time. usql uses it
rline A readline package for Go, which reads a line of text that a person edits. usql uses it
transit A Go port of tree-sitter, a parser of source code. rline uses it to highlight syntax, and usql to complete statements

About

Databse implementations in Go

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages