Versions in this module Expand all Collapse all v0 v0.2.0 Nov 17, 2023 Changes in this version + func NewSpannerGorm(dsn string) (*gorm.DB, error) v0.1.0 Nov 10, 2023 Changes in this version + type DatabaseAdmin struct + func NewDatabaseAdmin(ctx context.Context) (*DatabaseAdmin, error) + func (d *DatabaseAdmin) Close() + func (d *DatabaseAdmin) CreateDatabase(ctx context.Context, projectID, instanceID, databaseID string) error + func (d *DatabaseAdmin) CreateTable(ctx context.Context, projectID, instanceID, databaseID, ddl string) error + func (d *DatabaseAdmin) Databases(ctx context.Context, projectID, instanceID string) ([]string, error) + func (d *DatabaseAdmin) DropDatabase(ctx context.Context, projectID, instanceID, databaseID string) error + func (d *DatabaseAdmin) DropTable(ctx context.Context, projectID, instanceID, databaseID, name string) error + type InstanceAdmin struct + func NewInstanceAdmin(ctx context.Context) (*InstanceAdmin, error) + func (i *InstanceAdmin) Close() + func (i *InstanceAdmin) Create(ctx context.Context, projectID, instanceID string) error + func (i *InstanceAdmin) Delete(ctx context.Context, projectID, instanceID string) error + func (i *InstanceAdmin) Instances(ctx context.Context, projectID string) ([]string, error) + type Spanner struct + func NewSpanner(ctx context.Context, db string) (*Spanner, error) + func (s *Spanner) Close() + func (s *Spanner) Query(ctx context.Context, sql string) ([]*spannerapi.Row, error) + func (s *Spanner) Tables(ctx context.Context) ([]string, error) + func (s *Spanner) UpdateMutation(ctx context.Context, ms []*spannerapi.Mutation) error + func (s *Spanner) UpdateSQL(ctx context.Context, sql string) error + type SpannerDB struct + func NewSpannerDB(dsn string) (*SpannerDB, error) + func (s *SpannerDB) Begin(ctx context.Context) (*sql.Tx, error) + func (s *SpannerDB) BeginReadOnly(ctx context.Context) (*sql.Tx, error) + func (s *SpannerDB) Close() + func (s *SpannerDB) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error) + func (s *SpannerDB) Ping(ctx context.Context) error