1 | <?php |
||
17 | class TableAnalysis extends \EE_Base { |
||
18 | /** |
||
19 | * Returns the table name which will definitely have the wpdb prefix on the front, |
||
20 | * except if it currently has the wpdb->base_prefix on the front, in which case |
||
21 | * it will have the wpdb->base_prefix on it |
||
22 | * |
||
23 | * @global \wpdb $wpdb |
||
24 | * @param string $table_name |
||
25 | * @return string $tableName, having ensured it has the wpdb prefix on the front |
||
26 | */ |
||
27 | public function ensureTableNameHasPrefix( $table_name ) |
||
32 | |||
33 | |||
34 | |||
35 | /** |
||
36 | * Indicates whether or not the table has any entries. $table_name can |
||
37 | * optionally start with $wpdb->prefix or not |
||
38 | * @global \wpdb $wpdb |
||
39 | * @param string $table_name |
||
40 | * @return bool |
||
41 | */ |
||
42 | public function tableIsEmpty( $table_name ) |
||
52 | |||
53 | |||
54 | |||
55 | /** |
||
56 | * Indicates whether or not the table exists. $table_name can optionally |
||
57 | * have the $wpdb->prefix on the beginning, or not. |
||
58 | * @global \wpdb $wpdb |
||
59 | * @global array EZSQL_Error |
||
60 | * @param $table_name |
||
61 | * @return bool |
||
62 | */ |
||
63 | public function tableExists( $table_name ) |
||
105 | |||
106 | |||
107 | |||
108 | /** |
||
109 | * @param $table_name |
||
110 | * @param $index_name |
||
111 | * @return array of columns used on that index, Each entry is an object with the following properties { |
||
112 | * @type string Table |
||
113 | * @type string Non_unique "0" or "1" |
||
114 | * @type string Key_name |
||
115 | * @type string Seq_in_index |
||
116 | * @type string Column_name |
||
117 | * @type string Collation |
||
118 | * @type string Cardinality |
||
119 | * @type string Sub_part on a column, usually this is just the number of characters from this column to use in indexing |
||
120 | * @type string|null Packed |
||
121 | * @type string Null |
||
122 | * @type string Index_type |
||
123 | * @type string Comment |
||
124 | * @type string Index_comment |
||
125 | * } |
||
126 | */ |
||
127 | public function showIndexes($table_name, $index_name){ |
||
133 | } |
||
134 |