Skip to content

Commit

Permalink
chore: prepare v2
Browse files Browse the repository at this point in the history
  • Loading branch information
vlastahajek committed Dec 12, 2024
1 parent 8515730 commit f404ff5
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 18 deletions.
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +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]

### Breaking Changes
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

0 comments on commit f404ff5

Please sign in to comment.