Method | Description | |
---|---|---|
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 |
Method | Description | |
---|---|---|
getAllExistingTables ( $prefixTables = false ) | ||
getDb ( ) | ||
getDbName ( ) | ||
getDbSettings ( ) | ||
getTableEngine ( ) | ||
getTablePrefix ( ) | ||
getTablePrefixEscaped ( ) |
public createAnonymousUser ( ) |
public createDatabase ( string $dbName = null ) | ||
$dbName | string | Name of the database to create |
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. |
public getTableColumns ( string $tableName ) : array | ||
$tableName | string | The name of a table. |
return | array | Installed columns indexed by the column name. |
public getTableCreateSql ( string $tableName ) : string | ||
$tableName | string | |
return | string | SQL |
public getTablesCreateSql ( ) : array | ||
return | array | array of strings containing SQL |
public getTablesInstalled ( boolean $forceReload = true ) : array | ||
$forceReload | boolean | Invalidate cache |
return | array | installed Tables |
public getTablesNames ( ) : array | ||
return | array | Table names |