It is writen Pure Go run via elasticsearch rest api /_xpack/sql So... only support SELECT at this time
Install with
go get github.com/jhw0604/elasticsearch-sql
http[s]://[<encoding url base64 id:password>@]address:port
ID and Password connect with ":" and encoding base64 URL.
import (
"database/sql"
_ "github.com/jhw0604/elasticsearch-sql"
)
db, err := sql.Open("elasticsearch", "http://localhost:9200")
import (
"database/sql"
_ "github.com/jhw0604/elasticsearch-sql"
)
db, err := sql.Open("elasticsearch", "http://ZWxhc3RpYzpwYXNzd29yZA==@localhost:9200")