You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 24, 2020. It is now read-only.
I'm using this simple program to test out the sphinxql driver (not sure if it's ready for prime time given the lack of docs, but figured I'd give it a spin since the mysql driver doesn't talk to sphinxql):
package main
import "fmt"
import "database/sql"
import _ "github.com/go-sql-driver/sphinxql"
func main() {
db, err := sql.Open("sphinxql", "user:pass@tcp(dev7h:9306)/")
fmt.Println("opened!")
if err != nil {
panic(err.Error())
}
defer db.Close()
rows, err := db.Query("SELECT id FROM index_1 LIMIT 10")
if err != nil {
panic(err.Error())
}
for rows.Next() {
var id string
if err := rows.Scan(&id); err != nil {
fmt.Println(err.Error())
return
}
fmt.Println(id)
}
}