class Partition extends SubPartition

base Partition Class

Properties

protected string $db from SubPartition
protected string $table from SubPartition
protected string $name from SubPartition
protected integer $ordinal from SubPartition
protected string $method from SubPartition
protected string $expression from SubPartition
protected integer $rows from SubPartition
protected integer $dataLength from SubPartition
protected integer $indexLength from SubPartition
protected string $comment from SubPartition
protected string $description
protected SubPartition[] $subPartitions

Methods

__construct(array $row)

Constructs a partition

void
loadData(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
getName()

Return the partition name

int
getOrdinal()

Return the ordinal of the partition

string
getMethod()

Returns the partition method

string
getExpression()

Returns the partition expression

integer
getRows()

Returns the number of data rows

integer
getDataLength()

Returns the total data length

integer
getIndexLength()

Returns the tatal index length

string
getComment()

Returns the partition comment

string
getDescription()

Returns the partiotion description

void
addSubPartition(SubPartition $partition)

Add a sub partition

boolean
hasSubPartitions()

Whether there are sub partitions

getSubPartitions()

Returns the list of sub partitions

static Partition[]
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 boolean
havePartitioning()

checks if MySQL server supports partitioning

Details

in SubPartition at line 64
__construct(array $row)

Constructs a partition

Parameters

array $row fetched row from information_schema.PARTITIONS

at line 36
protected void loadData(array $row)

Loads data from the fetched row from information_schema.PARTITIONS

Parameters

array $row fetched row

Return Value

void

in SubPartition at line 94
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

in SubPartition at line 107
string getName()

Return the partition name

Return Value

string partition name

in SubPartition at line 117
int getOrdinal()

Return the ordinal of the partition

Return Value

int the ordinal

in SubPartition at line 127
string getMethod()

Returns the partition method

Return Value

string partition method

in SubPartition at line 137
string getExpression()

Returns the partition expression

Return Value

string partition expression

at line 86
integer getRows()

Returns the number of data rows

Return Value

integer number of rows

at line 104
integer getDataLength()

Returns the total data length

Return Value

integer data length

at line 122
integer getIndexLength()

Returns the tatal index length

Return Value

integer index length

in SubPartition at line 177
string getComment()

Returns the partition comment

Return Value

string partition comment

at line 54
string getDescription()

Returns the partiotion description

Return Value

string partition description

at line 66
void addSubPartition(SubPartition $partition)

Add a sub partition

Parameters

SubPartition $partition Sub partition

Return Value

void

at line 76
boolean hasSubPartitions()

Whether there are sub partitions

Return Value

boolean

at line 140
SubPartition[] getSubPartitions()

Returns the list of sub partitions

Return Value

SubPartition[]

at line 154
static Partition[] 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

Partition[]

at line 195
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

at line 216
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

at line 241
static boolean havePartitioning()

checks if MySQL server supports partitioning

Return Value

boolean