class PoolingShardManager implements ShardManager (View source)

Shard Manager for the Connection Pooling Shard Strategy

Methods

__construct(PoolingShardConnection $conn)

No description

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)

No description

Details

__construct(PoolingShardConnection $conn)

Parameters

PoolingShardConnection $conn

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)

Parameters

string $sql
array $params
array $types

Return Value

array

Exceptions

RuntimeException