A Go client library for rqlite, providing an idiomatic API and database/sql driver for the distributed SQLite database.
gorqlite is a Go client library for rqlite, a distributed SQLite database. It provides a high-level, idiomatic Go API that abstracts rqlite's HTTP interface, allowing developers to interact with rqlite clusters using familiar database/sql-like methods. It handles cluster discovery, leader failover, and rqlite-specific features like configurable consistency levels and queued writes.
Go developers building applications that require a lightweight, distributed SQL database with SQLite compatibility. It's particularly useful for those already using or evaluating rqlite who want a robust, production-ready Go client.
Developers choose gorqlite because it offers a seamless, idiomatic Go experience for rqlite, reducing boilerplate HTTP handling and providing fault-tolerant cluster interactions out of the box. Its dual API—both a dedicated client and a database/sql driver—gives flexibility for integration with existing Go database code.
A Go client for rqlite, the distributed database built on SQLite
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides familiar database/sql semantics like Open(), Query(), and Write(), making adoption seamless for Go developers accustomed to standard patterns, as shown in the examples.
Automatically discovers the rqlite cluster leader and peers, retrying failed requests on different nodes for fault tolerance, abstracting distributed database complexities without manual intervention.
Supports rqlite's consistency levels (none, weak, strong) via connection strings or SetConsistencyLevel(), allowing flexible trade-offs between availability and consistency per operation.
Offers TraceOn() and TraceOff() methods for granular debug output to any io.Writer, similar to Perl's DBI->Trace(), aiding in troubleshooting API interactions and cluster behavior.
The stdlib driver lacks support for rollback, prepared statements, and iterative fetching, making it unsuitable for code that depends on these standard database/sql features, as admitted in the README.
Since rqlite loads all query results into memory immediately without iterative fetching, handling large datasets can lead to performance issues or crashes on resource-constrained systems.
The main gorqlite connection object is not thread-safe, requiring additional synchronization in concurrent Go routines, whereas the stdlib driver is thread-safe but has other functional limitations.