Categorygithub.com/zalmanzhao/elasticsearch-sql
repositorypackage
0.1.3
Repository: https://github.com/zalmanzhao/elasticsearch-sql.git
Documentation: pkg.go.dev

# README

A Go Elasticsearch driver for Go's database/sql package

It is writen Pure Go run via elasticsearch rest api /__opendistro/_sql So... only support SELECT at this time

Install

Install with

go get github.com/zalmanzhao/elasticsearch-sql

Connection Parameters and DSN

http[s]://[<encoding url base64 id:password>@]address:port

ID and Password connect with ":" and encoding base64 URL.

import (
	"database/sql"
	_ "github.com/zalmanzhao/elasticsearch-sql"
)


db, err := sql.Open("elasticsearch", "http://localhost:9200")
import (
	"database/sql"
	_ "github.com/zalmanzhao/elasticsearch-sql"
)


db, err := sql.Open("elasticsearch", "http://ZWxhc3RpYzpwYXNzd29yZA==@localhost:9200")