method tableSize documentation in bbn\Db\Languages\Pgsql
Gets the size of a table
function(string $table, string $type = '')
{
$size = 0;
if (bbn\Str::checkName($table)) {
if ($type === 'data') {
$function = "pg_relation_size";
}
elseif ($type === 'index') {
$function = "pg_indexes_size";
}
else {
$function = "pg_total_relation_size";
}
$row = $this->getRow("SELECT $function(?)", $table);
if (!$row) {
throw new \Exception(X::_('Table ') . $table . X::_(' Not found'));
}
$size = current(array_values($row));
}
return $size;
}
Gets the size of a table BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions