Documentation ¶
Index ¶
- func BuildCLIOptions() *cli.App
- func CheckCompatibleVersion(cfg config.SQL, expectedVersion string) error
- func RunTool(args []string) error
- func ValidateConnectConfig(cfg *config.SQL) error
- func VerifyCompatibleVersion(cfg config.Persistence) error
- type Connection
- func (c *Connection) Close()
- func (c *Connection) CreateDatabase(name string) error
- func (c *Connection) CreateSchemaVersionTables() error
- func (c *Connection) DropAllTables() error
- func (c *Connection) DropDatabase(name string) error
- func (c *Connection) DropTable(name string) error
- func (c *Connection) ExecDDLQuery(stmt string, args ...interface{}) error
- func (c *Connection) ListTables() ([]string, error)
- func (c *Connection) ReadSchemaVersion() (string, error)
- func (c *Connection) UpdateSchemaVersion(newVersion string, minCompatibleVersion string) error
- func (c *Connection) WriteSchemaUpdateLog(oldVersion string, newVersion string, manifestMD5 string, desc string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCLIOptions ¶ added in v0.11.0
func BuildCLIOptions() *cli.App
BuildCLIOptions builds the options for cli
func CheckCompatibleVersion ¶ added in v0.11.0
CheckCompatibleVersion check the version compatibility
func ValidateConnectConfig ¶ added in v0.12.0
ValidateConnectConfig validates params
func VerifyCompatibleVersion ¶ added in v0.11.0
func VerifyCompatibleVersion( cfg config.Persistence, ) error
VerifyCompatibleVersion ensures that the installed version of cadence and visibility is greater than or equal to the expected version.
Types ¶
type Connection ¶ added in v0.11.0
type Connection struct {
// contains filtered or unexported fields
}
Connection is the connection to database
func NewConnection ¶ added in v0.11.0
func NewConnection(cfg *config.SQL) (*Connection, error)
NewConnection creates a new connection to database
func (*Connection) Close ¶ added in v0.11.0
func (c *Connection) Close()
Close closes the sql client
func (*Connection) CreateDatabase ¶ added in v0.11.0
func (c *Connection) CreateDatabase(name string) error
CreateDatabase creates a database if it doesn't exist
func (*Connection) CreateSchemaVersionTables ¶ added in v0.11.0
func (c *Connection) CreateSchemaVersionTables() error
CreateSchemaVersionTables sets up the schema version tables
func (*Connection) DropAllTables ¶ added in v0.11.0
func (c *Connection) DropAllTables() error
DropAllTables drops all tables from this database
func (*Connection) DropDatabase ¶ added in v0.11.0
func (c *Connection) DropDatabase(name string) error
DropDatabase drops a database
func (*Connection) DropTable ¶ added in v0.11.0
func (c *Connection) DropTable(name string) error
DropTable drops a given table from the database
func (*Connection) ExecDDLQuery ¶ added in v0.24.0
func (c *Connection) ExecDDLQuery(stmt string, args ...interface{}) error
ExecDDLQuery executes a sql statement
func (*Connection) ListTables ¶ added in v0.11.0
func (c *Connection) ListTables() ([]string, error)
ListTables returns a list of tables in this database
func (*Connection) ReadSchemaVersion ¶ added in v0.11.0
func (c *Connection) ReadSchemaVersion() (string, error)
ReadSchemaVersion returns the current schema version for the keyspace
func (*Connection) UpdateSchemaVersion ¶ added in v0.11.0
func (c *Connection) UpdateSchemaVersion(newVersion string, minCompatibleVersion string) error
UpdateSchemaVersion updates the schema version for the keyspace
func (*Connection) WriteSchemaUpdateLog ¶ added in v0.11.0
func (c *Connection) WriteSchemaUpdateLog(oldVersion string, newVersion string, manifestMD5 string, desc string) error
WriteSchemaUpdateLog adds an entry to the schema update history table