class SQLAzureShardManager implements ShardManager (View source)

Sharding using the SQL Azure Federations support.

Methods

__construct(Connection $conn)

No description

string
getFederationName()

Gets the name of the federation.

string
getDistributionKey()

Gets the distribution key.

string
getDistributionType()

Gets the Doctrine Type name used for the distribution.

void
setFilteringEnabled(bool $flag)

Sets Enabled/Disable filtering on the fly.

void
selectGlobal()

Selects global database with global data.

void
selectShard(string $distributionValue)

Selects the shard against which the queries after this statement will be issued.

string|null
getCurrentDistributionValue()

Gets the distribution value currently used for sharding.

array
getShards()

Gets information about the amount of shards and other details.

array
queryAll(string $sql, array $params = [], array $types = [])

Queries all shards in undefined order and return the results appended to each other. Restore the previous distribution value after execution.

void
splitFederation(mixed $splitDistributionValue)

Splits Federation at a given distribution value.

Details

__construct(Connection $conn)

Parameters

Connection $conn

Exceptions

ShardingException

string getFederationName()

Gets the name of the federation.

Return Value

string

string getDistributionKey()

Gets the distribution key.

Return Value

string

string getDistributionType()

Gets the Doctrine Type name used for the distribution.

Return Value

string

void setFilteringEnabled(bool $flag)

Sets Enabled/Disable filtering on the fly.

Parameters

bool $flag

Return Value

void

void selectGlobal()

Selects global database with global data.

This is the default database that is connected when no shard is selected.

Return Value

void

void selectShard(string $distributionValue)

Selects the shard against which the queries after this statement will be issued.

Parameters

string $distributionValue

Return Value

void

Exceptions

ShardingException If no value is passed as shard identifier.

string|null getCurrentDistributionValue()

Gets the distribution value currently used for sharding.

Return Value

string|null

array getShards()

Gets information about the amount of shards and other details.

Format is implementation specific, each shard is one element and has an 'id' attribute at least.

Return Value

array

array queryAll(string $sql, array $params = [], array $types = [])

Queries all shards in undefined order and return the results appended to each other. Restore the previous distribution value after execution.

Using {@link \Doctrine\DBAL\Connection::fetchAll} to retrieve rows internally.

Parameters

string $sql
array $params
array $types

Return Value

array

void splitFederation(mixed $splitDistributionValue)

Splits Federation at a given distribution value.

Parameters

mixed $splitDistributionValue

Return Value

void