Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: prepare v2 #120

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
## 1.1.0 [unreleased]
## 2.0.0 [unreleased]

### Breaking Changes

:warning: **This is a breaking change release.**

> Previously, the Query API did not respect the metadata type for columns returned from InfluxDB v3. This release fixes this issue. As a result, the type of some columns may differ from previous versions. For example, the timestamp column will now be `time.Time` instead of `arrow.Timestamp`.

Update steps:

1. Update library: `go get github.com/influxdata/influxdb3-go/v2`
1. Update import path in Go files to `github.com/influxdata/influxdb3-go/v2/influxdb3`.

### Features

1. [#114](https://github.com/InfluxCommunity/influxdb3-go/pull/114): Query API respects metadata types for columns returned from InfluxDB v3.
Tags are mapped as a "string", timestamp as "time.Time", and fields as their respective types:
- iox::column_type::field::integer: => int64
- iox::column_type::field::uinteger: => uint64
- iox::column_type::field::float: => float64
- iox::column_type::field::string: => string
- iox::column_type::field::boolean: => bool

## 1.0.0 [2024-11-15]

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ To use this client, you'll need the following credentials for writing and queryi
<!--pytest-codeblocks:cont-->

```sh
go get github.com/InfluxCommunity/influxdb3-go
go get github.com/InfluxCommunity/influxdb3-go/v2
```

### Outside a module (standalone)
Expand All @@ -79,7 +79,7 @@ import (
"fmt"
"os"

"github.com/InfluxCommunity/influxdb3-go/influxdb3/v1"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3"
)
```

Expand Down
2 changes: 1 addition & 1 deletion examples/Basic/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"time"

"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions examples/Batching/batching.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"text/tabwriter"
"time"

"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3/batching"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3/batching"
)

const NumPoints = 54
Expand Down
2 changes: 1 addition & 1 deletion examples/Downsampling/downsampling.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"time"

"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion examples/HTTPErrorHandled/httpErrorHandled.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"log"
"os"

"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3"
)

// Demonstrates working with HTTP response headers in ServerError
Expand Down
4 changes: 2 additions & 2 deletions examples/LPBatching/lpBatching.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"text/tabwriter"
"time"

"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3/batching"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3/batching"
)

const LineCount = 100
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/InfluxCommunity/influxdb3-go/v1
module github.com/InfluxCommunity/influxdb3-go/v2

go 1.22.7

Expand Down
2 changes: 1 addition & 1 deletion influxdb3/batching/batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"log/slog"
"sync"

"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3"
)

// DefaultBatchSize is the default number of points emitted
Expand Down
2 changes: 1 addition & 1 deletion influxdb3/batching/batcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"
"time"

"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions influxdb3/batching/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ import (
"math/rand"
"time"

"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3/batching"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3/batching"
)

func Example_batcher() {
Expand Down
4 changes: 2 additions & 2 deletions influxdb3/client_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import (
"testing"
"time"

"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3/batching"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3/batching"
"github.com/influxdata/line-protocol/v2/lineprotocol"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion influxdb3/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"strings"
"time"

"github.com/InfluxCommunity/influxdb3-go/v1/influxdb3/gzip"
"github.com/InfluxCommunity/influxdb3-go/v2/influxdb3/gzip"
"github.com/influxdata/line-protocol/v2/lineprotocol"
)

Expand Down
Loading