SQLAzureFederationsSynchronizer
extends AbstractSchemaSynchronizer
in package
SQL Azure Schema Synchronizer.
Will iterate over all shards when performing schema operations. This is done by partitioning the passed schema into subschemas for the federation and the global database and then applying the operations step by step using the SingleDatabaseSynchronizer.
Tags
Table of Contents
- FEDERATION_DISTRIBUTION_NAME = 'azure.federatedOnDistributionName'
- FEDERATION_TABLE_FEDERATED = 'azure.federated'
- $conn : Connection
- $shardManager : SQLAzureShardManager
- $synchronizer : SchemaSynchronizer
- __construct() : mixed
- createSchema() : mixed
- {@inheritdoc}
- dropAllSchema() : mixed
- {@inheritdoc}
- dropSchema() : mixed
- {@inheritdoc}
- getCreateSchema() : mixed
- {@inheritdoc}
- getDropAllSchema() : mixed
- {@inheritdoc}
- getDropSchema() : mixed
- {@inheritdoc}
- getUpdateSchema() : mixed
- {@inheritdoc}
- updateSchema() : mixed
- {@inheritdoc}
- processSql() : mixed
- processSqlSafely() : mixed
- extractSchemaFederation() : Schema
- getCreateFederationStatement() : string
- getFederationTypeDefaultValue() : string
- partitionSchema() : array<string|int, mixed>
- work() : array<string|int, mixed>
- Work on the Global/Federation based on currently existing shards and perform the given operation on the underlying schema synchronizer given the different partitioned schema instances.
Constants
FEDERATION_DISTRIBUTION_NAME
public
mixed
FEDERATION_DISTRIBUTION_NAME
= 'azure.federatedOnDistributionName'
FEDERATION_TABLE_FEDERATED
public
mixed
FEDERATION_TABLE_FEDERATED
= 'azure.federated'
Properties
$conn
protected
Connection
$conn
$shardManager
private
SQLAzureShardManager
$shardManager
$synchronizer
private
SchemaSynchronizer
$synchronizer
Methods
__construct()
public
__construct(Connection $conn, SQLAzureShardManager $shardManager[, SchemaSynchronizer|null $sync = null ]) : mixed
Parameters
- $conn : Connection
- $shardManager : SQLAzureShardManager
- $sync : SchemaSynchronizer|null = null
Return values
mixed —createSchema()
{@inheritdoc}
public
createSchema(Schema $createSchema) : mixed
Parameters
- $createSchema : Schema
Return values
mixed —dropAllSchema()
{@inheritdoc}
public
dropAllSchema() : mixed
Return values
mixed —dropSchema()
{@inheritdoc}
public
dropSchema(Schema $dropSchema) : mixed
Parameters
- $dropSchema : Schema
Return values
mixed —getCreateSchema()
{@inheritdoc}
public
getCreateSchema(Schema $createSchema) : mixed
Parameters
- $createSchema : Schema
Return values
mixed —getDropAllSchema()
{@inheritdoc}
public
getDropAllSchema() : mixed
Return values
mixed —getDropSchema()
{@inheritdoc}
public
getDropSchema(Schema $dropSchema) : mixed
Parameters
- $dropSchema : Schema
Return values
mixed —getUpdateSchema()
{@inheritdoc}
public
getUpdateSchema(Schema $toSchema[, mixed $noDrops = false ]) : mixed
Parameters
- $toSchema : Schema
- $noDrops : mixed = false
Return values
mixed —updateSchema()
{@inheritdoc}
public
updateSchema(Schema $toSchema[, mixed $noDrops = false ]) : mixed
Parameters
- $toSchema : Schema
- $noDrops : mixed = false
Return values
mixed —processSql()
protected
processSql(array<string|int, mixed> $sql) : mixed
Parameters
- $sql : array<string|int, mixed>
Return values
mixed —processSqlSafely()
protected
processSqlSafely(array<string|int, mixed> $sql) : mixed
Parameters
- $sql : array<string|int, mixed>
Return values
mixed —extractSchemaFederation()
private
extractSchemaFederation(Schema $schema, bool $isFederation) : Schema
Parameters
- $schema : Schema
- $isFederation : bool
Tags
Return values
Schema —getCreateFederationStatement()
private
getCreateFederationStatement() : string
Return values
string —getFederationTypeDefaultValue()
private
getFederationTypeDefaultValue() : string
Return values
string —partitionSchema()
private
partitionSchema(Schema $schema) : array<string|int, mixed>
Parameters
- $schema : Schema
Return values
array<string|int, mixed> —work()
Work on the Global/Federation based on currently existing shards and perform the given operation on the underlying schema synchronizer given the different partitioned schema instances.
private
work(Schema $schema, Closure $operation) : array<string|int, mixed>
Parameters
- $schema : Schema
- $operation : Closure