CRM_Core_InnoDBIndexer
class CRM_Core_InnoDBIndexer
The InnoDB indexer is responsible for creating and destroying full-text indices on InnoDB classes.
Constants
IDX_PREFIX |
|
Properties
protected array | $indices | Indices. | |
protected bool | $isActive |
Methods
No description
(Setting Callback) Respond to changes in the "enable_innodb_fts" setting
Class constructor.
Fix schema differences.
Determine if an index is expected to exist.
Get a list of FTS index names that are currently defined in the database.
Generate a "CREATE INDEX" statement for each desired FTS index.
Generate a "DROP INDEX" statement for each existing FTS index.
Construct a set of SQL statements which will create (or preserve) required indices and destroy unneeded indices.
Put the indices into a normalized format.
Setter for isActive.
Getter for isActive.
Details
at line 44
static CRM_Core_InnoDBIndexer
singleton(bool $fresh = FALSE)
at line 93
static
onToggleFts(bool $oldValue, bool $newValue, array $metadata)
(Setting Callback) Respond to changes in the "enable_innodb_fts" setting
at line 125
__construct(bool $isActive, array $indices)
Class constructor.
at line 137
fixSchemaDifferences()
Fix schema differences.
Limitation: This won't pick up stale indices on tables which are not declared in $this->indices. That's not much of an issue for now b/c we have a static list of tables.
at line 154
bool
hasDeclaredIndex(string $table, array $fields)
Determine if an index is expected to exist.
at line 179
array
findActualFtsIndexNames(string $table)
Get a list of FTS index names that are currently defined in the database.
at line 212
array
buildIndexSql($table)
Generate a "CREATE INDEX" statement for each desired FTS index.
at line 232
array
dropIndexSql(string $table)
Generate a "DROP INDEX" statement for each existing FTS index.
at line 249
array
reconcileIndexSqls(string $table)
Construct a set of SQL statements which will create (or preserve) required indices and destroy unneeded indices.
at line 279
array
normalizeIndices($indices)
Put the indices into a normalized format.
at line 295
setActive(bool $isActive)
Setter for isActive.
at line 304
bool
getActive()
Getter for isActive.