Files
tasks/tools/common/schema/mock_db.go
Stephan BehnkeandGitHub c9e360a3fb go fix (#9337)
## What changed?

Integrate Go 1.26's new `go fix` into workflow.

NOTE that the changes caused our linter to fire; a [separate
commit](https://github.com/temporalio/temporal/pull/9337/commits/1b23f787aef370098b35829c4d17dcc06230b4c1)
addresses those.

## Why?

Ensure Go code is standardized/modernized.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [x] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)
2026-02-18 09:12:19 -08:00

49 lines
1.2 KiB
Go

package schema
import (
"fmt"
)
type (
mockSQLDB struct {
}
)
// Exec executes a cql statement
func (db *mockSQLDB) Exec(stmt string, args ...any) error {
return fmt.Errorf("unimplemented")
}
// DropAllTables drops all tables
func (db *mockSQLDB) DropAllTables() error {
return fmt.Errorf("unimplemented")
}
// CreateSchemaVersionTables sets up the schema version tables
func (db *mockSQLDB) CreateSchemaVersionTables() error {
return fmt.Errorf("unimplemented")
}
// ReadSchemaVersion returns the current schema version for the keyspace
func (db *mockSQLDB) ReadSchemaVersion() (string, error) {
return "", fmt.Errorf("unimplemented")
}
// UpdateSchemaVersion updates the schema version for the keyspace
func (db *mockSQLDB) UpdateSchemaVersion(newVersion string, minCompatibleVersion string) error {
return fmt.Errorf("unimplemented")
}
// WriteSchemaUpdateLog adds an entry to the schema update history table
func (db *mockSQLDB) WriteSchemaUpdateLog(oldVersion string, newVersion string, manifestMD5 string, desc string) error {
return fmt.Errorf("unimplemented")
}
// Close gracefully closes the client object
func (db *mockSQLDB) Close() {}
// Type gives the type of db (e.g. "cassandra", "sql")
func (db *mockSQLDB) Type() string {
return "sql"
}