Skip to content
Snippets Groups Projects
Commit 30482aaf authored by ale's avatar ale
Browse files

Minor change in the QueryServer constructor

parent f62fd8f7
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ func main() {
}
if *enableQuery {
qsrv, err := pqhttp.NewQuery(*storageDir)
qsrv, err := pqhttp.NewQuery(filepath.Join(*storageDir, "logs.*.pq"))
if err != nil {
log.Fatal(err)
}
......
......@@ -11,7 +11,6 @@ import (
"log"
"math/rand"
"net/http"
"path/filepath"
"reflect"
"strings"
......@@ -31,13 +30,13 @@ type QueryServer struct {
db *sql.DB
}
func NewQuery(path string) (*QueryServer, error) {
func NewQuery(pattern string) (*QueryServer, error) {
db, err := sql.Open("duckdb", "")
if err != nil {
return nil, err
}
return &QueryServer{
glob: filepath.Join(path, "*.pq"),
glob: pattern,
db: db,
}, nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment