class Partition extends SubPartition (View source)

Properties

protected string|null $name from  SubPartition
protected int|null $ordinal from  SubPartition
protected string|null $method from  SubPartition
protected string|null $expression from  SubPartition
protected int $rows from  SubPartition
protected int $dataLength from  SubPartition
protected int $indexLength from  SubPartition
protected string $comment from  SubPartition
protected string|null $description
protected SubPartition[] $subPartitions

Methods

__construct(array $row)

Loads data from the fetched row from information_schema.PARTITIONS

void
loadCommonData(array $row)

Loads some data that is common to both partitions and sub partitions

string|null
getName()

Return the partition name

int|null
getOrdinal()

Return the ordinal of the partition

string|null
getMethod()

Returns the partition method

string|null
getExpression()

Returns the partition expression

int
getRows()

Returns the number of data rows

int
getDataLength()

Returns the total data length

int
getIndexLength()

Returns the total index length

string
getComment()

Returns the partition comment

string|null
getDescription()

Returns the partition description

void
addSubPartition(SubPartition $subPartition)

Add a sub partition

bool
hasSubPartitions()

Whether there are sub partitions

array
getSubPartitions()

Returns the list of sub partitions

static array
getPartitions(string $db, string $table)

Returns array of partitions for a specific db/table

static array
getPartitionNames(string $db, string $table)

returns array of partition names for a specific db/table

static string|null
getPartitionMethod(string $db, string $table)

returns the partition method used by the table.

static bool
havePartitioning()

checks if MySQL server supports partitioning

Details

__construct(array $row)

Loads data from the fetched row from information_schema.PARTITIONS

Parameters

array $row

fetched row from information_schema.PARTITIONS

protected void loadCommonData(array $row)

Loads some data that is common to both partitions and sub partitions

Parameters

array $row

fetched row

Return Value

void

string|null getName()

Return the partition name

Return Value

string|null

int|null getOrdinal()

Return the ordinal of the partition

Return Value

int|null

string|null getMethod()

Returns the partition method

Return Value

string|null

string|null getExpression()

Returns the partition expression

Return Value

string|null

int getRows()

Returns the number of data rows

Return Value

int

int getDataLength()

Returns the total data length

Return Value

int

int getIndexLength()

Returns the total index length

Return Value

int

string getComment()

Returns the partition comment

Return Value

string

string|null getDescription()

Returns the partition description

Return Value

string|null

void addSubPartition(SubPartition $subPartition)

Add a sub partition

Parameters

SubPartition $subPartition

Return Value

void

bool hasSubPartitions()

Whether there are sub partitions

Return Value

bool

array getSubPartitions()

Returns the list of sub partitions

Return Value

array

static array getPartitions(string $db, string $table)

Returns array of partitions for a specific db/table

Parameters

string $db

database name

string $table

table name

Return Value

array

static array getPartitionNames(string $db, string $table)

returns array of partition names for a specific db/table

Parameters

string $db

database name

string $table

table name

Return Value

array

of partition names

static string|null getPartitionMethod(string $db, string $table)

returns the partition method used by the table.

Parameters

string $db

database name

string $table

table name

Return Value

string|null

partition method

static bool havePartitioning()

checks if MySQL server supports partitioning

Return Value

bool