class SQLAzureFederationsSynchronizer extends AbstractSchemaSynchronizer (View source)

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}.

Constants

FEDERATION_TABLE_FEDERATED

FEDERATION_DISTRIBUTION_NAME

Properties

protected Connection $conn from AbstractSchemaSynchronizer

Methods

__construct(Connection $conn, SQLAzureShardManager $shardManager, SchemaSynchronizer $sync = null)

No description

processSqlSafely(array $sql)

No description

processSql(array $sql)

No description

array
getCreateSchema(Schema $createSchema)

Get the SQL statements that can be executed to create the schema.

array
getUpdateSchema(Schema $toSchema, bool $noDrops = false)

Get the SQL Statements to update given schema with the underlying db.

array
getDropSchema(Schema $dropSchema)

Get the SQL Statements to drop the given schema from underlying db.

void
createSchema(Schema $createSchema)

Create the Schema

void
updateSchema(Schema $toSchema, bool $noDrops = false)

Update the Schema to new schema version.

void
dropSchema(Schema $dropSchema)

Drop the given database schema from the underlying db.

array
getDropAllSchema()

Get the SQL statements to drop all schema assets from underlying db.

void
dropAllSchema()

Drop all assets from the underyling db.

Details

__construct(Connection $conn, SQLAzureShardManager $shardManager, SchemaSynchronizer $sync = null)

Parameters

Connection $conn
SQLAzureShardManager $shardManager
SchemaSynchronizer $sync

protected processSqlSafely(array $sql)

Parameters

array $sql

protected processSql(array $sql)

Parameters

array $sql

array getCreateSchema(Schema $createSchema)

Get the SQL statements that can be executed to create the schema.

Parameters

Schema $createSchema

Return Value

array

array getUpdateSchema(Schema $toSchema, bool $noDrops = false)

Get the SQL Statements to update given schema with the underlying db.

Parameters

Schema $toSchema
bool $noDrops

Return Value

array

array getDropSchema(Schema $dropSchema)

Get the SQL Statements to drop the given schema from underlying db.

Parameters

Schema $dropSchema

Return Value

array

void createSchema(Schema $createSchema)

Create the Schema

Parameters

Schema $createSchema

Return Value

void

void updateSchema(Schema $toSchema, bool $noDrops = false)

Update the Schema to new schema version.

Parameters

Schema $toSchema
bool $noDrops

Return Value

void

void dropSchema(Schema $dropSchema)

Drop the given database schema from the underlying db.

Parameters

Schema $dropSchema

Return Value

void

array getDropAllSchema()

Get the SQL statements to drop all schema assets from underlying db.

Return Value

array

void dropAllSchema()

Drop all assets from the underyling db.

Return Value

void