Skip to content

readme: support Tarantool 1.10+ #252

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

Merged
merged 1 commit into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Client in Go for Tarantool

The package `go-tarantool` contains everything you need to connect to
[Tarantool 1.6+][tarantool-site].
[Tarantool 1.10+][tarantool-site].

The advantage of integrating Go with Tarantool, which is an application server
plus a DBMS, is that Go programmers can handle databases and perform on-the-fly
Expand All @@ -32,7 +32,7 @@ faster than other packages according to public benchmarks.

## Installation

We assume that you have Tarantool version 1.6+ and a modern Linux or BSD
We assume that you have Tarantool version 1.10+ and a modern Linux or BSD
operating system.

You need a current version of `go`, version 1.13 or later (use `go version` to
Expand Down
56 changes: 26 additions & 30 deletions tarantool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -945,21 +945,19 @@ func TestClient(t *testing.T) {
}

// Upsert
if strings.Compare(conn.Greeting.Version, "Tarantool 1.6.7") >= 0 {
resp, err = conn.Upsert(spaceNo, []interface{}{uint(3), 1}, []interface{}{[]interface{}{"+", 1, 1}})
if err != nil {
t.Fatalf("Failed to Upsert (insert): %s", err.Error())
}
if resp == nil {
t.Errorf("Response is nil after Upsert (insert)")
}
resp, err = conn.Upsert(spaceNo, []interface{}{uint(3), 1}, []interface{}{[]interface{}{"+", 1, 1}})
if err != nil {
t.Fatalf("Failed to Upsert (update): %s", err.Error())
}
if resp == nil {
t.Errorf("Response is nil after Upsert (update)")
}
resp, err = conn.Upsert(spaceNo, []interface{}{uint(3), 1}, []interface{}{[]interface{}{"+", 1, 1}})
if err != nil {
t.Fatalf("Failed to Upsert (insert): %s", err.Error())
}
if resp == nil {
t.Errorf("Response is nil after Upsert (insert)")
}
resp, err = conn.Upsert(spaceNo, []interface{}{uint(3), 1}, []interface{}{[]interface{}{"+", 1, 1}})
if err != nil {
t.Fatalf("Failed to Upsert (update): %s", err.Error())
}
if resp == nil {
t.Errorf("Response is nil after Upsert (update)")
}

// Select
Expand Down Expand Up @@ -1977,21 +1975,19 @@ func TestClientNamed(t *testing.T) {
}

// Upsert
if strings.Compare(conn.Greeting.Version, "Tarantool 1.6.7") >= 0 {
resp, err = conn.Upsert(spaceName, []interface{}{uint(1003), 1}, []interface{}{[]interface{}{"+", 1, 1}})
if err != nil {
t.Fatalf("Failed to Upsert (insert): %s", err.Error())
}
if resp == nil {
t.Errorf("Response is nil after Upsert (insert)")
}
resp, err = conn.Upsert(spaceName, []interface{}{uint(1003), 1}, []interface{}{[]interface{}{"+", 1, 1}})
if err != nil {
t.Fatalf("Failed to Upsert (update): %s", err.Error())
}
if resp == nil {
t.Errorf("Response is nil after Upsert (update)")
}
resp, err = conn.Upsert(spaceName, []interface{}{uint(1003), 1}, []interface{}{[]interface{}{"+", 1, 1}})
if err != nil {
t.Fatalf("Failed to Upsert (insert): %s", err.Error())
}
if resp == nil {
t.Errorf("Response is nil after Upsert (insert)")
}
resp, err = conn.Upsert(spaceName, []interface{}{uint(1003), 1}, []interface{}{[]interface{}{"+", 1, 1}})
if err != nil {
t.Fatalf("Failed to Upsert (update): %s", err.Error())
}
if resp == nil {
t.Errorf("Response is nil after Upsert (update)")
}

// Select
Expand Down