db

package
v0.20.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TableNames = []string{
	"database_instance",
	"audit",
	"node_health",
	"topology_recovery",
	"database_instance_topology_history",
	"recovery_detection",
	"database_instance_last_analysis",
	"database_instance_analysis_changelog",
	"vtorc_db_deployments",
	"global_recovery_disable",
	"topology_recovery_steps",
	"database_instance_stale_binlog_coordinates",
	"vitess_tablet",
	"vitess_keyspace",
	"vitess_shard",
}

Functions

func ClearVTOrcDatabase added in v0.16.0

func ClearVTOrcDatabase()

ClearVTOrcDatabase is used to clear the VTOrc database. This function is meant to be used by tests to clear the database to get a clean slate without starting a new one.

func ExecVTOrc

func ExecVTOrc(query string, args ...any) (sql.Result, error)

ExecVTOrc will execute given query on the vtorc backend database.

func OpenVTOrc

func OpenVTOrc() (db *sql.DB, err error)

OpenTopology returns the DB instance for the vtorc backed database

func QueryVTOrc

func QueryVTOrc(query string, argsArray []any, onRow func(sqlutils.RowMap) error) error

QueryVTOrc

func QueryVTOrcRowsMap

func QueryVTOrcRowsMap(query string, onRow func(sqlutils.RowMap) error) error

QueryVTOrcRowsMap

Types

type DB

type DB interface {
	QueryVTOrc(query string, argsArray []any, onRow func(sqlutils.RowMap) error) error
}
var (
	Db DB = (*vtorcDB)(nil)
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL