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`\\..*" )
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 metric returns the count of sidecardb ddls that have been run 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.