Swoole\Model::shard_table PHP Метод

shard_table() публичный Метод

按ID切分表
public shard_table ( $id ) : null
$id
Результат null
    function shard_table($id)
    {
        if (empty($this->_table_before_shard)) {
            $this->_table_before_shard = $this->table;
        }
        $table_id = intval($id / $this->tablesize);
        $this->table = $this->_table_before_shard . '_' . $table_id;
    }