blob: 7f437822c9480839ccd199d259e109a3e0d1ceb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
<?php
/**
* Piwik - Open source web analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
* @version $Id$
*
* @category Piwik
* @package Piwik
*/
/**
* Database schema interface
*
* @package Piwik
* @subpackage Piwik_Db
*/
interface Piwik_Db_Schema_Interface
{
/**
* Is this schema available?
*
* @return bool True if schema is available; false otherwise
*/
static public function isAvailable();
/**
* Get the SQL to create a specific Piwik table
*
* @param string $tableName
* @return string SQL
*/
public function getTableCreateSql($tableName);
/**
* Get the SQL to create Piwik tables
*
* @return array array of strings containing SQL
*/
public function getTablesCreateSql();
/**
* Create database
*
* @param string $dbName Name of the database to create
*/
public function createDatabase( $dbName = null );
/**
* Drop database
*/
public function dropDatabase();
/**
* Create all tables
*/
public function createTables();
/**
* Creates an entry in the User table for the "anonymous" user.
*/
public function createAnonymousUser();
/**
* Truncate all tables
*/
public function truncateAllTables();
/**
* Drop specific tables
*
* @param array $doNotDelete Names of tables to not delete
*/
public function dropTables( $doNotDelete = array() );
/**
* Names of all the prefixed tables in piwik
* Doesn't use the DB
*
* @return array Table names
*/
public function getTablesNames();
/**
* Get list of tables installed
*
* @param bool $forceReload Invalidate cache
* @return array installed Tables
*/
public function getTablesInstalled($forceReload = true);
/**
* Checks whether any table exists
*
* @return bool True if tables exist; false otherwise
*/
public function hasTables();
}
|