spannerclient

package
v0.0.0-...-d938113 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReadOnlyTransaction

type ReadOnlyTransaction interface {
	Query(ctx context.Context, statement spanner.Statement) RowIterator
}

type Row

type Row interface {
	ToStruct(p interface{}) error
}

type RowIterator

type RowIterator interface {
	Next() (Row, error)
	Stop()
}

type SpannerClient

type SpannerClient interface {
	Close()
	Apply(ctx context.Context, ms []*spanner.Mutation, opts ...spanner.ApplyOption) (commitTimestamp time.Time, err error)
	Single() ReadOnlyTransaction
}

func NewClient

func NewClient(ctx context.Context, projectID string) (SpannerClient, error)

type SpannerClientProxy

type SpannerClientProxy struct {
	// contains filtered or unexported fields
}

func (*SpannerClientProxy) Apply

func (proxy *SpannerClientProxy) Apply(ctx context.Context, ms []*spanner.Mutation, opts ...spanner.ApplyOption,
) (commitTimestamp time.Time, err error)

func (*SpannerClientProxy) Close

func (proxy *SpannerClientProxy) Close()

func (*SpannerClientProxy) Single

func (proxy *SpannerClientProxy) Single() ReadOnlyTransaction

type SpannerReadOnlyTransactionProxy

type SpannerReadOnlyTransactionProxy struct {
	// contains filtered or unexported fields
}

func (*SpannerReadOnlyTransactionProxy) Query

type SpannerRowIteratorProxy

type SpannerRowIteratorProxy struct {
	// contains filtered or unexported fields
}

func (*SpannerRowIteratorProxy) Next

func (proxy *SpannerRowIteratorProxy) Next() (Row, error)

func (*SpannerRowIteratorProxy) Stop

func (proxy *SpannerRowIteratorProxy) Stop()

Jump to

Keyboard shortcuts

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