Documentation ¶
Index ¶
Constants ¶
View Source
const ( SidecarDBName = "_vt" CreateSidecarDatabaseQuery = "create database if not exists _vt" UseSidecarDatabaseQuery = "use _vt" ShowSidecarDatabasesQuery = "SHOW DATABASES LIKE '\\_vt'" SelectCurrentDatabaseQuery = "select database()" ShowCreateTableQuery = "show create table _vt.%s" CreateTableRegexp = "CREATE TABLE .* `\\_vt`\\..*" AlterTableRegexp = "ALTER TABLE `\\_vt`\\..*" )
View Source
const StatsKeyErrorCount = StatsKeyPrefix + "ErrorCount"
View Source
const StatsKeyErrors = StatsKeyPrefix + "Errors"
View Source
const StatsKeyPrefix = "SidecarDBDDL"
View Source
const StatsKeyQueryCount = StatsKeyPrefix + "QueryCount"
Variables ¶
This section is empty.
Functions ¶
func AddSchemaInitQueries ¶
AddSchemaInitQueries adds sidecar database schema related queries to a mock db.
func GetDDLCount ¶
func GetDDLCount() int64
GetDDLCount returns the count of sidecardb DDLs that have been run as part of this vttablet's init process.
func GetDDLErrorCount ¶
func GetDDLErrorCount() int64
GetDDLErrorCount returns the count of sidecardb DDLs that have been errored out as part of this vttablet's init process.
func GetDDLErrorHistory ¶
func GetDDLErrorHistory() []*ddlError
GetDDLErrorHistory returns the errors encountered as part of this vttablet's init process..
func Init ¶
Init creates or upgrades the sidecar database based on declarative schema for all tables in the schema.
func MatchesInitQuery ¶
MatchesInitQuery returns true if query has one of the test patterns as a substring, or it matches a provided regexp.
Types ¶
Click to show internal directories.
Click to hide internal directories.