Documentation
¶
Index ¶
- Variables
- func DecodeConfig(input any) (database.Connector, error)
- type Config
- type Row
- type Rows
- type SpannerPooler
- type Transaction
- func (t *Transaction) Begin(_ context.Context, _ *database.TransactionOptions) (database.Transaction, error)
- func (t *Transaction) Commit(_ context.Context) error
- func (t *Transaction) End(ctx context.Context, err error) error
- func (t *Transaction) Exec(ctx context.Context, query string, args ...any) (int64, error)
- func (t *Transaction) Query(ctx context.Context, query string, args ...any) (database.Rows, error)
- func (t *Transaction) QueryRow(ctx context.Context, query string, args ...any) database.Row
- func (t *Transaction) Rollback(_ context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Name = "spanner"
)
Functions ¶
Types ¶
type Config ¶
type Config struct {
DSN string
}
Config holds connection settings for a Spanner database accessed via the go-sql-spanner driver (GoogleSQL dialect). DSN format: projects/<project>/instances/<instance>/databases/<database>
type Rows ¶
type Rows struct {
// contains filtered or unexported fields
}
func (*Rows) CollectExactlyOneRow ¶
func (*Rows) CollectFirst ¶
type SpannerPooler ¶
type SpannerPooler interface {
// contains filtered or unexported methods
}
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Begin ¶
func (t *Transaction) Begin(_ context.Context, _ *database.TransactionOptions) (database.Transaction, error)
Begin returns an error: Spanner does not support nested transactions or savepoints.
Click to show internal directories.
Click to hide internal directories.