internal

package
v0.0.0-...-c013a64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAborted = errors.New("aborted")

Functions

func NamedValueParamNames

func NamedValueParamNames(q string, n int) ([]string, error)

Types

type RWConnector

type RWConnector struct {
	QueryIn  chan *RWQueryMessage
	QueryOut chan *RWQueryMessage

	ExecIn  chan *RWExecMessage
	ExecOut chan *RWExecMessage

	RollbackIn chan struct{}
	CommitIn   chan struct{}
	Errors     chan error // only for starting, commit and rollback

	Ready chan struct{}
}

RWConnector starts a Cloud Spanner read-write transaction and provides blocking APIs to query, exec, rollback and commit.

func NewRWConnector

func NewRWConnector(ctx context.Context, c *spanner.Client) *RWConnector

type RWExecMessage

type RWExecMessage struct {
	Ctx  context.Context   // in
	Stmt spanner.Statement // in

	Rows  int64 // out
	Error error // out
}

type RWQueryMessage

type RWQueryMessage struct {
	Ctx  context.Context   // in
	Stmt spanner.Statement // in

	It *spanner.RowIterator // out
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL