diff --git a/README.md b/README.md index fdfb7a8..d6aeff7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![GoDoc reference](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/questdb/go-questdb-client/v3) +[![GoDoc reference](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/questdb/go-questdb-client/v4) # go-questdb-client @@ -15,11 +15,10 @@ Features: * Automatic write retries and connection reuse for ILP over HTTP. * Tested against QuestDB 7.3.10 and newer versions. -New in v3: -* Supports ILP over HTTP using the same client semantics +New in v4: * Supports n-dimensional arrays of doubles for QuestDB servers 9.0.0 and up -Documentation is available [here](https://pkg.go.dev/github.com/questdb/go-questdb-client/v3). +Documentation is available [here](https://pkg.go.dev/github.com/questdb/go-questdb-client/v4). ## Quickstart @@ -31,7 +30,7 @@ import ( "log" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" ) func main() { @@ -212,7 +211,7 @@ package main import ( "context" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" ) func main() { @@ -243,54 +242,6 @@ func main() { } ``` -## Migration from v2 - -v2 code example: -```go -package main - -import ( - "context" - - qdb "github.com/questdb/go-questdb-client/v2" -) - -func main() { - // Connect to QuestDB running on 127.0.0.1:9009 (ILP/TCP) - sender, err := qdb.NewLineSender(context.TODO()) - // ... - defer sender.Close() - // ... -} -``` - -Migrated v3 code: -```go -package main - -import ( - "context" - - qdb "github.com/questdb/go-questdb-client/v3" -) - -func main() { - // Connect to QuestDB running on 127.0.0.1:9000 (ILP/HTTP) - sender, err := qdb.NewLineSender(context.TODO(), qdb.WithHTTP()) - // Alternatively, you can use the LineSenderFromConf function: - // sender, err := qdb.LineSenderFromConf(ctx, "http::addr=localhost:9000;") - // ... - // or you can export the "http::addr=localhost:9000;" config string to - // the QDB_CLIENT_CONF environment variable and use the LineSenderFromEnv function: - // sender, err := qdb.LineSenderFromEnv(ctx) - // ... - defer sender.Close(context.TODO()) - // ... -} -``` - -Note that the migrated code uses the HTTP sender instead of the TCP one. - ## Community If you need help, have additional questions or want to provide feedback, you diff --git a/buffer_test.go b/buffer_test.go index 5e7dcfe..646e506 100644 --- a/buffer_test.go +++ b/buffer_test.go @@ -33,7 +33,7 @@ import ( "testing" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" "github.com/stretchr/testify/assert" ) diff --git a/conf_test.go b/conf_test.go index 37018dd..378c524 100644 --- a/conf_test.go +++ b/conf_test.go @@ -29,7 +29,7 @@ import ( "testing" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" "github.com/stretchr/testify/assert" ) diff --git a/examples.manifest.yaml b/examples.manifest.yaml index 99f35fe..97f713c 100644 --- a/examples.manifest.yaml +++ b/examples.manifest.yaml @@ -4,13 +4,13 @@ lang: go path: examples/tcp/basic/main.go header: |- - Go client library [docs](https://pkg.go.dev/github.com/questdb/go-questdb-client/v3) + Go client library [docs](https://pkg.go.dev/github.com/questdb/go-questdb-client/v4) and [repo](https://github.com/questdb/go-questdb-client). - name: ilp-auth lang: go path: examples/tcp/auth/main.go header: |- - Go client library [docs](https://pkg.go.dev/github.com/questdb/go-questdb-client/v3) + Go client library [docs](https://pkg.go.dev/github.com/questdb/go-questdb-client/v4) and [repo](https://github.com/questdb/go-questdb-client). auth: kid: testUser1 @@ -22,7 +22,7 @@ lang: go path: examples/tcp/auth-and-tls/main.go header: |- - Go client library [docs](https://pkg.go.dev/github.com/questdb/go-questdb-client/v3) + Go client library [docs](https://pkg.go.dev/github.com/questdb/go-questdb-client/v4) and [repo](https://github.com/questdb/go-questdb-client). auth: kid: testUser1 @@ -34,6 +34,6 @@ lang: go path: examples/from-conf/main.go header: |- - Go client library [docs](https://pkg.go.dev/github.com/questdb/go-questdb-client/v3) + Go client library [docs](https://pkg.go.dev/github.com/questdb/go-questdb-client/v4) and [repo](https://github.com/questdb/go-questdb-client). conf: http::addr=localhost:9000; diff --git a/examples/from-conf/main.go b/examples/from-conf/main.go index 08437b1..b39f0bd 100644 --- a/examples/from-conf/main.go +++ b/examples/from-conf/main.go @@ -5,7 +5,7 @@ import ( "log" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" ) func main() { diff --git a/examples/http/auth-and-tls/main.go b/examples/http/auth-and-tls/main.go index bacbc60..6906998 100644 --- a/examples/http/auth-and-tls/main.go +++ b/examples/http/auth-and-tls/main.go @@ -5,7 +5,7 @@ import ( "log" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" ) func main() { diff --git a/examples/http/auth/main.go b/examples/http/auth/main.go index 05fc71e..e6f2a13 100644 --- a/examples/http/auth/main.go +++ b/examples/http/auth/main.go @@ -5,7 +5,7 @@ import ( "log" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" ) func main() { diff --git a/examples/http/basic/main.go b/examples/http/basic/main.go index 83c0370..9f3c51b 100644 --- a/examples/http/basic/main.go +++ b/examples/http/basic/main.go @@ -5,7 +5,7 @@ import ( "log" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" ) func main() { diff --git a/examples/tcp/auth-and-tls/main.go b/examples/tcp/auth-and-tls/main.go index 90363f8..45f792e 100644 --- a/examples/tcp/auth-and-tls/main.go +++ b/examples/tcp/auth-and-tls/main.go @@ -5,7 +5,7 @@ import ( "log" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" ) func main() { diff --git a/examples/tcp/auth/main.go b/examples/tcp/auth/main.go index db137a6..2a0728b 100644 --- a/examples/tcp/auth/main.go +++ b/examples/tcp/auth/main.go @@ -5,7 +5,7 @@ import ( "log" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" ) func main() { diff --git a/examples/tcp/basic/main.go b/examples/tcp/basic/main.go index 5fdc632..08a9106 100644 --- a/examples/tcp/basic/main.go +++ b/examples/tcp/basic/main.go @@ -5,7 +5,7 @@ import ( "log" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" ) func main() { diff --git a/go.mod b/go.mod index eb411c1..a9715f1 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/questdb/go-questdb-client/v3 +module github.com/questdb/go-questdb-client/v4 go 1.19 @@ -26,7 +26,6 @@ require ( github.com/golang/protobuf v1.5.3 // indirect github.com/google/uuid v1.6.0 // indirect github.com/klauspost/compress v1.17.0 // indirect - github.com/kr/text v0.2.0 // indirect github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/moby/patternmatcher v0.6.0 // indirect diff --git a/go.sum b/go.sum index 67dc8f7..1af1d34 100644 --- a/go.sum +++ b/go.sum @@ -1,13 +1,11 @@ dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= @@ -22,9 +20,7 @@ github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/dockercfg v0.3.1 h1:/FpZ+JaygUR/lZP2NlFI2DVfrOEMAIKP5wWEJdoYe9E= github.com/cpuguy83/dockercfg v0.3.1/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= -github.com/cpuguy83/dockercfg v0.3.2/go.mod h1:sugsbF4//dDlL/i+S+rtpIWp+5h0BHJHfjj5/jFyUJc= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -34,7 +30,6 @@ github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m3 github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v24.0.9+incompatible h1:HPGzNmwfLZWdxHqK9/II92pyi1EpYKsAqcl4G0Of9v0= github.com/docker/docker v24.0.9+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v28.2.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -63,25 +58,21 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a h1:N9zuLhTvBSRt0gWSiJswwQ2HqDmtX/ZCDJURnKUt1Ik= github.com/lufia/plan9stats v0.0.0-20230326075908-cb1d2100619a/go.mod h1:JKx41uQRwqlTZabZc+kILPrO/3jlKnQ2Z8b7YiVw5cE= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= -github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= -github.com/moby/sys/sequential v0.6.0/go.mod h1:uyv8EUTrca5PnDsdMGXhZe6CCe8U/UiTWd+lL+7b/Ko= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= @@ -91,7 +82,6 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= -github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M= github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -126,11 +116,9 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= github.com/testcontainers/testcontainers-go v0.26.0/go.mod h1:ICriE9bLX5CLxL9OFQ2N+2N+f+803LNJ1utJb1+Inx0= -github.com/testcontainers/testcontainers-go v0.38.0/go.mod h1:C52c9MoHpWO+C4aqmgSU+hxlR5jlEayWtgYrb8Pzz1w= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= @@ -142,7 +130,6 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -183,7 +170,6 @@ golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= diff --git a/http_integration_test.go b/http_integration_test.go index f1815f8..510b420 100644 --- a/http_integration_test.go +++ b/http_integration_test.go @@ -30,7 +30,7 @@ import ( "testing" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" "github.com/stretchr/testify/assert" ) @@ -64,6 +64,7 @@ func (suite *integrationTestSuite) TestE2ESuccessfulHttpBasicAuthWithTlsProxy() err = sender. Table(testTable). StringColumn("str_col", "foobar"). + Float64Array1DColumn("arr_col", []float64{1.0, 2.0, 3.0}). At(ctx, time.UnixMicro(1)) if err != nil { assert.Fail(suite.T(), err.Error()) @@ -88,11 +89,12 @@ func (suite *integrationTestSuite) TestE2ESuccessfulHttpBasicAuthWithTlsProxy() expected := tableData{ Columns: []column{ {"str_col", "VARCHAR"}, + {"arr_col", "ARRAY"}, {"timestamp", "TIMESTAMP"}, }, Dataset: [][]interface{}{ - {"foobar", "1970-01-01T00:00:00.000001Z"}, - {"barbaz", "1970-01-01T00:00:00.000002Z"}, + {"foobar", []interface{}{float64(1), float64(2), float64(3)}, "1970-01-01T00:00:00.000001Z"}, + {"barbaz", nil, "1970-01-01T00:00:00.000002Z"}, }, Count: 2, } @@ -110,18 +112,13 @@ func (suite *integrationTestSuite) TestServerSideError() { ctx := context.Background() - var ( - sender qdb.LineSender - err error - ) - questdbC, err := setupQuestDB(ctx, noAuth) if err != nil { assert.Fail(suite.T(), err.Error()) return } - sender, err = qdb.NewLineSender(ctx, qdb.WithHttp(), qdb.WithAddress(questdbC.httpAddress)) + sender, err := qdb.NewLineSender(ctx, qdb.WithHttp(), qdb.WithAddress(questdbC.httpAddress)) if err != nil { assert.Fail(suite.T(), err.Error()) return diff --git a/http_sender_test.go b/http_sender_test.go index 47d9a43..1c93c9a 100644 --- a/http_sender_test.go +++ b/http_sender_test.go @@ -33,7 +33,7 @@ import ( "testing" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" "github.com/stretchr/testify/assert" ) diff --git a/integration_test.go b/integration_test.go index e5b6f42..37eb7b1 100644 --- a/integration_test.go +++ b/integration_test.go @@ -34,7 +34,7 @@ import ( "testing" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" "github.com/testcontainers/testcontainers-go" @@ -44,7 +44,7 @@ import ( // Common integration tests for ILP/HTTP and ILP/TCP. const ( - eventualDataTimeout = 60 * time.Second + eventualDataTimeout = 90 * time.Second ) type integrationTestSuite struct { diff --git a/interop_test.go b/interop_test.go index 88f0ec0..78f8ab4 100644 --- a/interop_test.go +++ b/interop_test.go @@ -32,7 +32,7 @@ import ( "strings" "testing" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" "github.com/stretchr/testify/assert" ) diff --git a/ndarray_test.go b/ndarray_test.go index acd0fde..9ea1865 100644 --- a/ndarray_test.go +++ b/ndarray_test.go @@ -27,7 +27,7 @@ package questdb_test import ( "testing" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/sender_pool_test.go b/sender_pool_test.go index a98e489..8d75b57 100644 --- a/sender_pool_test.go +++ b/sender_pool_test.go @@ -31,7 +31,7 @@ import ( "testing" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/tcp_integration_test.go b/tcp_integration_test.go index fc8b5fa..14eb2e3 100644 --- a/tcp_integration_test.go +++ b/tcp_integration_test.go @@ -37,7 +37,7 @@ import ( "github.com/stretchr/testify/assert" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" ) func (suite *integrationTestSuite) TestE2EWriteInBatches() { diff --git a/tcp_sender_test.go b/tcp_sender_test.go index 688494e..ddc496e 100644 --- a/tcp_sender_test.go +++ b/tcp_sender_test.go @@ -31,7 +31,7 @@ import ( "testing" "time" - qdb "github.com/questdb/go-questdb-client/v3" + qdb "github.com/questdb/go-questdb-client/v4" "github.com/stretchr/testify/assert" )