Pipe improvements, misc cleanup

* Pipe improvements; better filter code, pipeline etc.
* Moved commands in PDO plugin to dedicated namespace
This commit is contained in:
2021-12-23 15:31:26 +01:00
parent 9050c74a08
commit f4257b39e4
11 changed files with 254 additions and 15 deletions

View File

@ -30,6 +30,7 @@ class PdoShell {
private ?array $lastQuery = null;
#[EnumSetting('output', [ 'table', 'vertical', 'dump' ])]
#[EnumSetting('table.style', [ 'box', 'compact', 'borderless' ])]
private array $defaultOptions = [
'output' => 'table',
'table.maxwidth' => 40,

View File

@ -1,6 +1,6 @@
<?php
namespace SparkPlug\Com\Noccy\Pdo;
namespace SparkPlug\Com\Noccy\Pdo\Commands;
use Spark\Commands\Command;
use Symfony\Component\Console\Helper\Table;

View File

@ -1,6 +1,6 @@
<?php
namespace SparkPlug\Com\Noccy\Pdo;
namespace SparkPlug\Com\Noccy\Pdo\Commands;
use Spark\Commands\Command;
use Symfony\Component\Console\Helper\Table;

View File

@ -1,6 +1,6 @@
<?php
namespace SparkPlug\Com\Noccy\Pdo;
namespace SparkPlug\Com\Noccy\Pdo\Commands;
use Spark\Commands\Command;
use Symfony\Component\Console\Helper\Table;

View File

@ -7,8 +7,8 @@ use SparkPlug;
class PdoPlugin extends SparkPlug {
public function load()
{
register_command(new PdoQueryCommand());
register_command(new PdoExecCommand());
register_command(new Commands\PdoQueryCommand());
register_command(new Commands\PdoExecCommand());
}
}