Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewSession = func(ctx context.Context, opt config.Spanner) (ISession, error) { options := make([]option.ClientOption, 0) if opt.EndPoint != "" { options = append(options, option.WithEndpoint(opt.EndPoint)) } if opt.WithoutAuthentication { options = append(options, option.WithoutAuthentication()) } if opt.GRPCInsecure { options = append(options, option.WithGRPCDialOption(grpc.WithTransportCredentials(insecure.NewCredentials()))) } return newClient(ctx, fmt.Sprintf(`projects/%s/instances/%s/databases/%s`, opt.ProjectID, opt.Instance, opt.Database), options...) }
NewSession method
Functions ¶
This section is empty.
Types ¶
type ISession ¶
type ISession interface { Close() Single() *spanner.ReadOnlyTransaction ReadOnlyTransaction() *spanner.ReadOnlyTransaction BatchReadOnlyTransaction(ctx context.Context, tb spanner.TimestampBound) (*spanner.BatchReadOnlyTransaction, error) BatchReadOnlyTransactionFromID(tid spanner.BatchReadOnlyTransactionID) *spanner.BatchReadOnlyTransaction ReadWriteTransaction(ctx context.Context, f func(context.Context, *spanner.ReadWriteTransaction) error) (commitTimestamp time.Time, err error) Apply(ctx context.Context, ms []*spanner.Mutation, opts ...spanner.ApplyOption) (commitTimestamp time.Time, err error) PartitionedUpdate(ctx context.Context, statement spanner.Statement) (count int64, err error) PartitionedUpdateWithOptions(ctx context.Context, statement spanner.Statement, opts spanner.QueryOptions) (count int64, err error) }
ISession interface
Click to show internal directories.
Click to hide internal directories.