Skip to content

Commit

Permalink
use context
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jun 15, 2024
2 parents 5431eb7 + 2e1fe3e commit 1aa5b2e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions quackpipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ func quack(query string, stdin bool, format string, params string, hashdb string
}
defer db.Close()


if !stdin {
check(db.ExecContext(context.Background(),"LOAD httpfs; LOAD json; LOAD parquet;"))
check(db.ExecContext(context.Background(),"SET autoinstall_known_extensions=1;"))
Expand Down Expand Up @@ -100,9 +99,9 @@ func initFlags() {
appFlags.Port = flag.String("port", "8123", "API port. Default 8123")
appFlags.Format = flag.String("format", "JSONCompact", "API port. Default JSONCompact")
appFlags.Params = flag.String("params", "", "DuckDB optional parameters. Default to none.")
appFlags.DBPath = flag.String("dbpath", "/tmp/", "DuckDB DB storage path. Default to /tmp.")
appFlags.DBPath = flag.String("dbpath", "/tmp/", "DuckDB DB storage path. Default to /tmp/")
appFlags.Stdin = flag.Bool("stdin", false, "STDIN query. Default false")
appFlags.Alias = flag.Bool("alias", false, "Built-in Aliases. Slower. Default false")
appFlags.Alias = flag.Bool("alias", false, "Built-in CH Aliases. Default false")
flag.Parse()
}

Expand Down

0 comments on commit 1aa5b2e

Please sign in to comment.