\Dbmover\CoreTables

Abstract base plugin. Usually other plugins extend this, but should at the very least implement `Dbmover\Core\PluginInterface`.

Summary

Methods
Properties
Constants
__construct()
__invoke()
addOperation()
defer()
persist()
__destruct()
No public properties found
DESCRIPTION
DEFERRED
findOperations()
extractOperations()
checkTableStatus()
modifyColumn()
$loader
$statements
$deferredStatements
$columns
N/A
No private methods found
No private properties found
N/A

Constants

DESCRIPTION

DESCRIPTION

DEFERRED

DEFERRED

Properties

$loader

$loader : \Dbmover\Core\Dbmover\Core\Loader

Type

\Dbmover\Core\Dbmover\Core\Loader

$statements

$statements : array

Type

array

$deferredStatements

$deferredStatements : array

Type

array

$columns

$columns : \Dbmover\Core\PdoStatement

Type

\Dbmover\Core\PdoStatement

Methods

__construct()

__construct(\Dbmover\Core\Dbmover\Core\Loader  $loader) : void

Parameters

\Dbmover\Core\Dbmover\Core\Loader $loader

__invoke()

__invoke(string  $sql) : string

Parameters

string $sql

Returns

string

addOperation()

addOperation(string  $sql) : void

Add an SQL operation to the pool.

Parameters

string $sql

defer()

defer(string  $sql) : void

Defer an SQL statement for later handling.

Parameters

string $sql

persist()

persist() : void

Persist all default statements to the Loader.

__destruct()

__destruct() : void

Persist all deferred statements to the loader.

findOperations()

findOperations(\Dbmover\Core\string  $regex, \Dbmover\Core\string  $sql)

Parameters

\Dbmover\Core\string $regex
\Dbmover\Core\string $sql

extractOperations()

extractOperations(\Dbmover\Core\string  $regex, \Dbmover\Core\string  $sql)

Parameters

\Dbmover\Core\string $regex
\Dbmover\Core\string $sql

checkTableStatus()

checkTableStatus(string  $table, string  $sql) : void

Compare the table status against the requested SQL, and generate ALTER statements accordingly.

Parameters

string $table

Name of the table

string $sql

SQL of the requested table definition

modifyColumn()

modifyColumn(string  $table, string  $column, array  $definition, array  $current) : array

Parameters

string $table
string $column
array $definition
array $current

Returns

array