Go-SQL-REST-Driver
A simple driver for Go's database/sql
package for SQL over REST API endpoints, such as those found within the
RestAssured Query Gateway.
Installation
Install:
go get -u github.com/adaptant-labs/go-sql-rest-driver
Usage
Go SQL REST Driver is a limited implementation of Go's database/sql/driver
interface. You only need to import the driver and can then use the database/sql
API.
Use mysql
as driverName
and a valid REST API Endpoint:
import "database/sql"
import _ "github.com/adaptant-labs/go-sql-rest-driver"
db, err := sql.Open("restsql", "http://localhost:9000/query/v1/")
Online Documentation
Limited API documentation for the driver interface itself is provided through godoc, this can be accessed
directly on the package entry
in the godoc package repository. In general, however, the database/sql
API should always be the main method of invocation.
Acknowledgements
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 731678.
License
go-sql-rest-driver is licensed under the terms of the Apache 2.0 license, the full
version of which can be found in the LICENSE
file included in the distribution.