PHP Класс Piwik\Db\Schema\Mysql

Наследование: implements Piwik\Db\SchemaInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
createAnonymousUser ( ) Creates an entry in the User table for the "anonymous" user.
createDatabase ( string $dbName = null ) Create database
createTable ( string $nameWithoutPrefix, string $createDefinition ) Creates a new table in the database.
createTables ( ) Create all tables
dropDatabase ( $dbName = null ) Drop database
getTableColumns ( string $tableName ) : array Get list of installed columns in a table
getTableCreateSql ( string $tableName ) : string Get the SQL to create a specific Piwik table
getTablesCreateSql ( ) : array Get the SQL to create Piwik tables
getTablesInstalled ( boolean $forceReload = true ) : array Get list of tables installed
getTablesNames ( ) : array Names of all the prefixed tables in piwik Doesn't use the DB
hasTables ( ) : boolean Checks whether any table exists
truncateAllTables ( ) Truncate all tables

Приватные методы

Метод Описание
getAllExistingTables ( $prefixTables = false )
getDb ( )
getDbName ( )
getDbSettings ( )
getTableEngine ( )
getTablePrefix ( )
getTablePrefixEscaped ( )

Описание методов

createAnonymousUser() публичный Метод

Creates an entry in the User table for the "anonymous" user.
public createAnonymousUser ( )

createDatabase() публичный Метод

Create database
public createDatabase ( string $dbName = null )
$dbName string Name of the database to create

createTable() публичный Метод

Creates a new table in the database.
public createTable ( string $nameWithoutPrefix, string $createDefinition )
$nameWithoutPrefix string The name of the table without any piwik prefix.
$createDefinition string The table create definition, see the "MySQL CREATE TABLE" specification for more information.

createTables() публичный Метод

Create all tables
public createTables ( )

dropDatabase() публичный Метод

Drop database
public dropDatabase ( $dbName = null )

getTableColumns() публичный Метод

Get list of installed columns in a table
public getTableColumns ( string $tableName ) : array
$tableName string The name of a table.
Результат array Installed columns indexed by the column name.

getTableCreateSql() публичный Метод

Get the SQL to create a specific Piwik table
public getTableCreateSql ( string $tableName ) : string
$tableName string
Результат string SQL

getTablesCreateSql() публичный Метод

Get the SQL to create Piwik tables
public getTablesCreateSql ( ) : array
Результат array array of strings containing SQL

getTablesInstalled() публичный Метод

Get list of tables installed
public getTablesInstalled ( boolean $forceReload = true ) : array
$forceReload boolean Invalidate cache
Результат array installed Tables

getTablesNames() публичный Метод

Names of all the prefixed tables in piwik Doesn't use the DB
public getTablesNames ( ) : array
Результат array Table names

hasTables() публичный Метод

Checks whether any table exists
public hasTables ( ) : boolean
Результат boolean True if tables exist; false otherwise

truncateAllTables() публичный Метод

Truncate all tables
public truncateAllTables ( )