Documentation ¶
Index ¶
- func NewSpannerGorm(dsn string) (*gorm.DB, error)
- type DatabaseAdmin
- 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
- type Spanner
- 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
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DatabaseAdmin ¶
type DatabaseAdmin struct {
// contains filtered or unexported fields
}
func NewDatabaseAdmin ¶
func NewDatabaseAdmin(ctx context.Context) (*DatabaseAdmin, error)
func (*DatabaseAdmin) Close ¶
func (d *DatabaseAdmin) Close()
func (*DatabaseAdmin) CreateDatabase ¶
func (d *DatabaseAdmin) CreateDatabase(ctx context.Context, projectID, instanceID, databaseID string) error
データベース作成 if not exists
func (*DatabaseAdmin) CreateTable ¶
func (d *DatabaseAdmin) CreateTable(ctx context.Context, projectID, instanceID, databaseID, ddl string) error
テーブル作成
func (*DatabaseAdmin) Databases ¶
func (d *DatabaseAdmin) Databases(ctx context.Context, projectID, instanceID string) ([]string, error)
データベース一覧
func (*DatabaseAdmin) DropDatabase ¶
func (d *DatabaseAdmin) DropDatabase(ctx context.Context, projectID, instanceID, databaseID string) error
データベース削除 if exists
type InstanceAdmin ¶
type InstanceAdmin struct {
// contains filtered or unexported fields
}
func NewInstanceAdmin ¶
func NewInstanceAdmin(ctx context.Context) (*InstanceAdmin, error)
func (*InstanceAdmin) Close ¶
func (i *InstanceAdmin) Close()
func (*InstanceAdmin) Create ¶
func (i *InstanceAdmin) Create(ctx context.Context, projectID, instanceID string) error
インスタンス作成 if not exists
type Spanner ¶
type Spanner struct {
// contains filtered or unexported fields
}
google-cloud-go
func (*Spanner) UpdateMutation ¶
type SpannerDB ¶
type SpannerDB struct {
// contains filtered or unexported fields
}
go-sql-spanner
func NewSpannerDB ¶
func (*SpannerDB) BeginReadOnly ¶
func (*SpannerDB) ExecContext ¶
Click to show internal directories.
Click to hide internal directories.