Doctrine\DBAL\Sharding\SQLAzure\SQLAzureFederationsSynchronizer
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
{@see \Doctrine\DBAL\Sharding\SingleDatabaseSynchronizer}.
- Author: Benjamin Eberlei <kontakt@beberlei.de>
Synopsis
class SQLAzureFederationsSynchronizer
extends AbstractSchemaSynchronizer
{
- // constants
- const FEDERATION_TABLE_FEDERATED = 'azure.federated';
- const FEDERATION_DISTRIBUTION_NAME = 'azure.federatedOnDistributionName';
- // members
- private SQLAzureShardManager $shardManager;
- private SchemaSynchronizer $synchronizer;
- // Inherited members from AbstractSchemaSynchronizer
- protected Connection $conn;
- // methods
- public void __construct()
- public array getCreateSchema()
- public array getUpdateSchema()
- public array getDropSchema()
- public void createSchema()
- public void updateSchema()
- public void dropSchema()
- public array getDropAllSchema()
- public void dropAllSchema()
- private void partitionSchema()
- private void extractSchemaFederation()
- private array work()
- private void getFederationTypeDefaultValue()
- private void getCreateFederationStatement()
- // Inherited methods from AbstractSchemaSynchronizer
- public void __construct()
- protected void processSqlSafely()
- protected void processSql()
Hierarchy
Constants
Name | Value |
---|---|
FEDERATION_TABLE_FEDERATED | 'azure.federated' |
FEDERATION_DISTRIBUTION_NAME | 'azure.federatedOnDistributionName' |
Members
private
- $synchronizer — Doctrine\DBAL\Sharding\SQLAzure\SchemaSynchronizer
protected
- $conn — Doctrine\DBAL\Connection
Methods
private
- extractSchemaFederation()
- getCreateFederationStatement()
- getFederationTypeDefaultValue()
- partitionSchema()
- work() — Work on the Global/Federation based on currently existing shards and perform the given operation on the underyling schema synchronizer given the different partioned schema instances.
public
- __construct()
- createSchema() — Create the Schema
- dropAllSchema() — Drop all assets from the underyling db.
- dropSchema() — Drop the given database schema from the underlying db.
- getCreateSchema() — Get the SQL statements that can be executed to create the schema.
- getDropAllSchema() — Get the SQL statements to drop all schema assets from underlying db.
- getDropSchema() — Get the SQL Statements to drop the given schema from underlying db.
- getUpdateSchema() — Get the SQL Statements to update given schema with the underlying db.
- updateSchema() — Update the Schema to new schema version.