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

How to do transaction without have to write it in Lua? #101

Closed
kokizzu opened this issue Aug 20, 2021 · 3 comments · Fixed by #185
Closed

How to do transaction without have to write it in Lua? #101

kokizzu opened this issue Aug 20, 2021 · 3 comments · Fixed by #185
Assignees
Labels
feature A new functionality

Comments

@kokizzu
Copy link

kokizzu commented Aug 20, 2021

https://www.tarantool.io/en/doc/latest/book/box/atomic/

@funny-falcon
Copy link

Afaik there is no way for external transaction.

@Totktonada
Copy link
Member

Now we have the interactive transactions support on the server side: tarantool/tarantool#2016. So it worth to implement in the connector.

A brief protocol description is here: tarantool/doc#2310.

net.box API as a reference: tarantool/doc#2311.

@Totktonada Totktonada added feature A new functionality teamE labels Dec 13, 2021
@AnaNek
Copy link

AnaNek commented May 25, 2022

The proposed API for this feature is the following:

  1. Add method to create a stream object for Connection and ConnectionPool, method for Connection doesn't get any parameters, method for ConnectionPool get mode parameter.
func (conn *Connection) NewStream() (*Stream, error);
func (connPool *ConnectionPool) NewStream(userMode Mode) (*Stream, error);
  1. Implement Stream object with the Do(), DoTyped(), DoAsync() to work with request objects and add Begin(), Commit(), Rollback() methods.
    Begin() - start transaction via iproto stream.
    Commit() - commit transaction.
    Rollback() - rollback transaction.

Use case example:

package main

import (
        "fmt"
        "log"

        "github.com/tarantool/go-tarantool"
)

func main() {
        conn, err := Connect(server, opts)
        if err != nil {
	    fmt.Printf("Failed to connect: %s", err.Error())
            return
        }
        if conn == nil {
	    fmt.Printf("conn is nil after Connect")
            return
        }
        defer conn.Close()

        stream, err := conn.NewStream()
        if err != nil {
	    fmt.Printf("Failed to create stream: %s", err.Error())
            return
        }
        if stream == nil {
	    fmt.Printf("stream is nil after NewStream")
            return
        }

        // Begin transaction
	resp, err = stream.Begin()
	if err != nil {
		fmt.Printf("Failed to Begin: %s", err.Error())
		return
	}
	fmt.Printf("Begin transaction:response is %#v\n", resp.Code)

	// Insert in stream
	req = tarantool.NewInsertRequest(spaceName).
		Tuple([]interface{}{uint(1001), "hello2", "world2"})
	resp, err = stream.Do(req)
	if err != nil {
		fmt.Printf("Failed to Insert: %s", err.Error())
		return
	}
	fmt.Printf("Insert in stream:response is %#v\n", resp.Code)

	// Select not related to the transaction
	// while transaction is not commited
	// result of select is empty
	req = tarantool.NewSelectRequest(spaceNo).
		Index(indexNo).
		Offset(0).
		Limit(1).
		Iterator(tarantool.IterEq).
		Key([]interface{}{uint(1001)})
	resp, err = conn.Do(req)
	if err != nil {
		fmt.Printf("Failed to Select: %s", err.Error())
		return
	}
	fmt.Printf("Select out of stream:response is %#v\n", resp.Data)

	// Select in stream
	req = tarantool.NewSelectRequest(spaceNo).
		Index(indexNo).
		Offset(0).
		Limit(1).
		Iterator(tarantool.IterEq).
		Key([]interface{}{uint(1001)})
	resp, err = stream.Do(req)
	if err != nil {
		fmt.Printf("Failed to Select: %s", err.Error())
		return
	}
	fmt.Printf("Select in stream:response is %#v\n", resp.Data)

	// Commit transaction
	resp, err = stream.Commit()
	if err != nil {
		fmt.Printf("Failed to Commit: %s", err.Error())
		return
	}
	fmt.Printf("Commit transaction:response is %#v\n", resp.Code)

	// Select outside of transaction
	req = tarantool.NewSelectRequest(spaceNo).
		Index(indexNo).
		Offset(0).
		Limit(1).
		Iterator(tarantool.IterEq).
		Key([]interface{}{uint(1001)})
	resp, err = conn.Do(req)
	if err != nil {
		fmt.Printf("Failed to Select: %s", err.Error())
		return
	}
	fmt.Printf("Select after commit:response is %#v\n", resp.Data)
}

AnaNek added a commit that referenced this issue Jun 16, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()`, `DoAsync()`, `DoTyped()`,
   `Begin()`, `Commit()`, `Rollback()` methods,
   `Begin()` - start transaction via iproto stream;
   `Commit()` - commit transaction;
   `Rollback()` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 4, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()`, `DoAsync()`, `DoTyped()`,
   `Begin()`, `Commit()`, `Rollback()` methods,
   `Begin()` - start transaction via iproto stream;
   `Commit()` - commit transaction;
   `Rollback()` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 4, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()`, `Begin()`,
   `Commit()`, `Rollback()` methods,
   `Begin()` - start transaction via iproto stream;
   `Commit()` - commit transaction;
   `Rollback()` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 4, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()`, `Begin()`,
   `Commit()`, `Rollback()` methods,
   `Begin()` - start transaction via iproto stream;
   `Commit()` - commit transaction;
   `Rollback()` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 4, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()`, `Begin()`,
   `Commit()`, `Rollback()` methods,
   `Begin()` - start transaction via iproto stream;
   `Commit()` - commit transaction;
   `Rollback()` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 12, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()`, `Begin()`,
   `Commit()`, `Rollback()` methods,
   `Begin()` - start transaction via iproto stream;
   `Commit()` - commit transaction;
   `Rollback()` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 12, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()`, `Begin()`,
   `Commit()`, `Rollback()` methods,
   `Begin()` - start transaction via iproto stream;
   `Commit()` - commit transaction;
   `Rollback()` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 12, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 13, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 18, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 19, 2022
File `requests.go` has `fill*` functions as well
as `prepare.go` file. We should sync with `requests.go`
and place `fill*` functions in the beginning of `prepare.go` file.

Follows up #101
AnaNek added a commit that referenced this issue Jul 19, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 19, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 20, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 20, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 27, 2022
File `requests.go` has `fill*` functions as well
as `prepare.go` file. We should sync with `requests.go`
and place `fill*` functions in the beginning of `prepare.go` file.

Follows up #117
Part of #101
AnaNek added a commit that referenced this issue Jul 27, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 27, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Jul 27, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
oleg-jukovec added a commit that referenced this issue Jul 27, 2022
Overview

This release adds a number of features. The extending of the public API
has become possible with a new way of creating requests. New types of
requests are created via chain calls:

selectReq := NewSelectRequest("space").
             Context(ctx).
			 Index(1).
			 Offset(5).
			 Limit(10)
future := conn.Do(selectReq)

Streams, context and prepared statements support are based on this
idea:

stream, err := conn.NewStream()
beginReq := NewBeginRequest().Context(ctx)
if response, err := stream.Do(beginReq).Get(); err != nil {
    selectFuture := stream.Do(selectReq)
    commitFuture := stream.Do(NewCommitRequest())
    // ...
}
```

Breaking changes

    NewErrorFuture function removed (#190).

    `IPROTO_*` constants that identify requests renamed from
    `<Name>Request` to `<Name>RequestCode` (#126)

New features

    SSL support (#155).

    IPROTO_PUSH messages support (#67).

    Public API with request object types (#126).

    Support decimal type in msgpack (#96).

    Support datetime type in msgpack (#118).

    Prepared SQL statements (#117).

    Streams and interactive transactions support (#101).

    `Call16` method, support build tag `go_tarantool_call_17`
    to choose default behavior for `Call` method as Call17 (#125)

Bugfixes

    Add `ExecuteAsync` and `ExecuteTyped` to common connector
    interface (#62).
AnaNek added a commit that referenced this issue Aug 1, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
oleg-jukovec added a commit to tarantool/doc that referenced this issue Aug 2, 2022
Add context, streams, SQL and push messages support in Go connector

Follows up tarantool/go-tarantool#48
Follows up tarantool/go-tarantool#62
Follows up tarantool/go-tarantool#67
Follows up tarantool/go-tarantool#101
oleg-jukovec added a commit to tarantool/doc that referenced this issue Aug 2, 2022
Add context, streams, SQL and push messages support in Go connector

Follows up tarantool/go-tarantool#48
Follows up tarantool/go-tarantool#62
Follows up tarantool/go-tarantool#67
Follows up tarantool/go-tarantool#101
AnaNek added a commit that referenced this issue Aug 2, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Aug 2, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
AnaNek added a commit that referenced this issue Aug 2, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
oleg-jukovec pushed a commit that referenced this issue Aug 2, 2022
File `requests.go` has `fill*` functions as well
as `prepare.go` file. We should sync with `requests.go`
and place `fill*` functions in the beginning of `prepare.go` file.

Follows up #117
Part of #101
oleg-jukovec pushed a commit that referenced this issue Aug 2, 2022
The main purpose of streams is transactions via iproto.
Since v. 2.10.0, Tarantool supports streams and
interactive transactions over them. Each stream
can start its own transaction, so they allows
multiplexing several transactions over one connection.

API for this feature is the following:

* `NewStream()` method to create a stream object for `Connection`
   and `NewStream(userMode Mode)` method to create a stream object
   for `ConnectionPool`
*  stream object `Stream` with `Do()` method and
   new request objects to work with stream,
   `BeginRequest` - start transaction via iproto stream;
   `CommitRequest` - commit transaction;
   `RollbackRequest` - rollback transaction.

Closes #101
oleg-jukovec added a commit that referenced this issue Aug 2, 2022
Overview

This release adds a number of features. The extending of the public API
has become possible with a new way of creating requests. New types of
requests are created via chain calls:

selectReq := NewSelectRequest("space").
             Context(ctx).
			 Index(1).
			 Offset(5).
			 Limit(10)
future := conn.Do(selectReq)

Streams, context and prepared statements support are based on this
idea:

stream, err := conn.NewStream()
beginReq := NewBeginRequest().Context(ctx)
if response, err := stream.Do(beginReq).Get(); err != nil {
    selectFuture := stream.Do(selectReq)
    commitFuture := stream.Do(NewCommitRequest())
    // ...
}
```

Breaking changes

    NewErrorFuture function removed (#190).

    `IPROTO_*` constants that identify requests renamed from
    `<Name>Request` to `<Name>RequestCode` (#126)

New features

    SSL support (#155).

    IPROTO_PUSH messages support (#67).

    Public API with request object types (#126).

    Support decimal type in msgpack (#96).

    Support datetime type in msgpack (#118).

    Prepared SQL statements (#117).

    Streams and interactive transactions support (#101).

    `Call16` method, support build tag `go_tarantool_call_17`
    to choose default behavior for `Call` method as Call17 (#125)

Bugfixes

    Add `ExecuteAsync` and `ExecuteTyped` to common connector
    interface (#62).
oleg-jukovec added a commit that referenced this issue Aug 3, 2022
Overview

This release adds a number of features. The extending of the public API
has become possible with a new way of creating requests. New types of
requests are created via chain calls:

selectReq := NewSelectRequest("space").
             Context(ctx).
			 Index(1).
			 Offset(5).
			 Limit(10)
future := conn.Do(selectReq)

Streams, context and prepared statements support are based on this
idea:

stream, err := conn.NewStream()
beginReq := NewBeginRequest().Context(ctx)
if response, err := stream.Do(beginReq).Get(); err != nil {
    selectFuture := stream.Do(selectReq)
    commitFuture := stream.Do(NewCommitRequest())
    // ...
}
```

Breaking changes

    NewErrorFuture function removed (#190).

    `IPROTO_*` constants that identify requests renamed from
    `<Name>Request` to `<Name>RequestCode` (#126)

New features

    SSL support (#155).

    IPROTO_PUSH messages support (#67).

    Public API with request object types (#126).

    Support decimal type in msgpack (#96).

    Support datetime type in msgpack (#118).

    Prepared SQL statements (#117).

	Context support for request objects (#48).

    Streams and interactive transactions support (#101).

    `Call16` method, support build tag `go_tarantool_call_17`
    to choose default behavior for `Call` method as Call17 (#125)

Bugfixes

    Add `ExecuteAsync` and `ExecuteTyped` to common connector
    interface (#62).
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
Overview

This release adds a number of features. The extending of the public API
has become possible with a new way of creating requests. New types of
requests are created via chain calls:

selectReq := NewSelectRequest("space").
             Context(ctx).
			 Index(1).
			 Offset(5).
			 Limit(10)
future := conn.Do(selectReq)

Streams, context and prepared statements support are based on this
idea:

stream, err := conn.NewStream()
beginReq := NewBeginRequest().Context(ctx)
if response, err := stream.Do(beginReq).Get(); err != nil {
    selectFuture := stream.Do(selectReq)
    commitFuture := stream.Do(NewCommitRequest())
    // ...
}
```

Breaking changes

    NewErrorFuture function removed (#190).

    `IPROTO_*` constants that identify requests renamed from
    `<Name>Request` to `<Name>RequestCode` (#126)

New features

    SSL support (#155).

    IPROTO_PUSH messages support (#67).

    Public API with request object types (#126).

    Support decimal type in msgpack (#96).

    Support datetime type in msgpack (#118).

    Prepared SQL statements (#117).

	Context support for request objects (#48).

    Streams and interactive transactions support (#101).

    `Call16` method, support build tag `go_tarantool_call_17`
    to choose default behavior for `Call` method as Call17 (#125)

Bugfixes

    Add `ExecuteAsync` and `ExecuteTyped` to common connector
    interface (#62).
oleg-jukovec added a commit that referenced this issue Aug 4, 2022
Overview

This release adds a number of features. The extending of the public API
has become possible with a new way of creating requests. New types of
requests are created via chain calls:

selectReq := NewSelectRequest("space").
             Context(ctx).
             Index(1).
             Offset(5).
             Limit(10)
future := conn.Do(selectReq)

Streams, context and prepared statements support are based on this
idea:

stream, err := conn.NewStream()
beginReq := NewBeginRequest().Context(ctx)
if response, err := stream.Do(beginReq).Get(); err != nil {
    selectFuture := stream.Do(selectReq)
    commitFuture := stream.Do(NewCommitRequest())
    // ...
}
```

Breaking changes

    NewErrorFuture function removed (#190).

    `IPROTO_*` constants that identify requests renamed from
    `<Name>Request` to `<Name>RequestCode` (#126)

New features

    SSL support (#155).

    IPROTO_PUSH messages support (#67).

    Public API with request object types (#126).

    Support decimal type in msgpack (#96).

    Support datetime type in msgpack (#118).

    Prepared SQL statements (#117).

    Context support for request objects (#48).

    Streams and interactive transactions support (#101).

    `Call16` method, support build tag `go_tarantool_call_17`
    to choose default behavior for `Call` method as Call17 (#125)

Bugfixes

    Add `ExecuteAsync` and `ExecuteTyped` to common connector
    interface (#62).
oleg-jukovec added a commit to tarantool/doc that referenced this issue Aug 15, 2022
The patch adds context, streams, SQL, push messages and master
discovery support for connection pool to go-tarantool. It also updates
GitHub starts for Go connectors.

Follows up tarantool/go-tarantool#48
Follows up tarantool/go-tarantool#62
Follows up tarantool/go-tarantool#67
Follows up tarantool/go-tarantool#101
Follows up tarantool/go-tarantool#113
patiencedaur pushed a commit to tarantool/doc that referenced this issue Aug 15, 2022
Resolves #3094 

The patch adds context, streams, SQL, push messages and master
discovery support for connection pool to go-tarantool. It also updates
GitHub starts for Go connectors.

Follows up tarantool/go-tarantool#48
Follows up tarantool/go-tarantool#62
Follows up tarantool/go-tarantool#67
Follows up tarantool/go-tarantool#101
Follows up tarantool/go-tarantool#113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants