Skip to content

Commit 807383e

Browse files
committed
Use NewConnectionFromConnString
1 parent 10a47fa commit 807383e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

chdb/wrapper.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ func Query(queryStr string, outputFormats ...string) (result chdbpurego.ChdbResu
1010
if len(outputFormats) > 0 {
1111
outputFormat = outputFormats[0]
1212
}
13+
// tempSession, err := initConnection(":memory:?verbose&log-level=test")
1314
tempSession, err := initConnection(":memory:")
1415
if err != nil {
1516
return nil, err
@@ -19,7 +20,5 @@ func Query(queryStr string, outputFormats ...string) (result chdbpurego.ChdbResu
1920
}
2021

2122
func initConnection(connStr string) (result chdbpurego.ChdbConn, err error) {
22-
argv := []string{connStr}
23-
// Call NewConnection with the constructed arguments
24-
return chdbpurego.NewConnection(len(argv), argv)
23+
return chdbpurego.NewConnectionFromConnString(connStr)
2524
}

0 commit comments

Comments
 (0)