Documentation

PoolingShardManager
in package
implements ShardManager

Shard Manager for the Connection Pooling Shard Strategy

Tags
author

Benjamin Eberlei kontakt@beberlei.de

Interfaces, Classes and Traits

ShardManager
Sharding Manager gives access to APIs to implementing sharding on top of Doctrine\DBAL\Connection instances.

Table of Contents

$choser  : ShardChoser
$conn  : PoolingShardConnection
$currentDistributionValue  : string|null
__construct()  : mixed
getCurrentDistributionValue()  : string|null
Gets the distribution value currently used for sharding.
getShards()  : array<string|int, mixed>
Gets information about the amount of shards and other details.
queryAll()  : array<string|int, mixed>
Queries all shards in undefined order and return the results appended to each other. Restore the previous distribution value after execution.
selectGlobal()  : void
Selects global database with global data.
selectShard()  : void
Selects the shard against which the queries after this statement will be issued.

Properties

Methods

getCurrentDistributionValue()

Gets the distribution value currently used for sharding.

public getCurrentDistributionValue() : string|null
Return values
string|null

getShards()

Gets information about the amount of shards and other details.

public getShards() : array<string|int, mixed>
Return values
array<string|int, mixed>

queryAll()

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

public queryAll(string $sql, array<string|int, mixed> $params, array<string|int, mixed> $types) : array<string|int, mixed>
Parameters
$sql : string
$params : array<string|int, mixed>
$types : array<string|int, mixed>
Tags
throws
RuntimeException
Return values
array<string|int, mixed>

selectGlobal()

Selects global database with global data.

public selectGlobal() : void
Return values
void

selectShard()

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

public selectShard(string $distributionValue) : void
Parameters
$distributionValue : string
Return values
void

Search results