diff --git a/README.md b/README.md index f5045af..0bd84b8 100644 --- a/README.md +++ b/README.md @@ -2035,6 +2035,8 @@ In a nutshell: > > Every decimal version means that it patches/fixes/refactoring a previous functionality i.e. 1.5.0 -> 1.5.1 (fix) +* 3.6 2022-07-07 + * [CLI] update CLI to 1.1 * 3.5 2022-07-06 * [ORM] fixed recursive when "query", "insert","update" and "delete". Now recursive work with aliases. * _BasePdoOne update to binary version BINARYVERSION. It will require regeneration of repository classes. diff --git a/lib/PdoOne.php b/lib/PdoOne.php index a700628..ecfe589 100644 --- a/lib/PdoOne.php +++ b/lib/PdoOne.php @@ -26,11 +26,11 @@ * @package eftec * @author Jorge Castro Castillo * @copyright (c) Jorge Castro C. Dual Licence: MIT and Commercial License https://github.com/EFTEC/PdoOne - * @version 3.5 + * @version 3.6 */ class PdoOne { - public const VERSION = '3.5'; + public const VERSION = '3.6'; /** @var int We need this value because null and false could be a valid value. */ public const NULL = PHP_INT_MAX; /** @var string Prefix of the tables */ diff --git a/lib/PdoOneCli.php b/lib/PdoOneCli.php index 08f14e5..5391c9e 100644 --- a/lib/PdoOneCli.php +++ b/lib/PdoOneCli.php @@ -25,11 +25,11 @@ * @package eftec * @author Jorge Castro Castillo * @copyright (c) Jorge Castro C. Dual Licence: MIT and Commercial License https://github.com/EFTEC/PdoOne - * @version 1.0 + * @version 1.1 */ class PdoOneCli { - public const VERSION = '1.0'; + public const VERSION = '1.1'; // /** * @var array @@ -382,13 +382,11 @@ public function cliEngine(): void break; } if (!$ok) {// $first->value) { - var_dump('load'); $database = $this->cli->evalParam('databasetype', $interactive, true); $server = $this->cli->evalParam('server', $interactive, true); $user = $this->cli->evalParam('user', $interactive, true); $pwd = $this->cli->evalParam('password', $interactive, true); $db = $this->cli->evalParam('database', $interactive, true); - var_dump('two'); } else { $database = $this->cli->getValue('databasetype'); $server = $this->cli->getValue('server'); @@ -522,7 +520,7 @@ protected function showHelpExport(): void protected function runCliConnection($force=false): ?PdoOne { - if (!$this->cli->getValue('databasetype') && $force===false) { + if ($force===false &&!$this->cli->getValue('databasetype')) { return null; } if($force) { @@ -755,6 +753,7 @@ public function createPdoInstance(): ?PdoOne { $pdo->logLevel = 1; $pdo->connect(); } catch(Exception $ex) { + /** @noinspection PhpUndefinedVariableInspection */ $this->cli->showCheck('ERROR','red',['Unable to connect to database',$pdo->lastError(),$pdo->errorText]); return null; } @@ -1238,6 +1237,7 @@ protected function databaseScan($tablesmarked, $pdo): void $pk = '??'; $pk = $pdo->service->getPK($ktable, $pk); $pkFirst = (is_array($pk) && count($pk) > 0) ? $pk[0] : null; + /** @noinspection PhpUnusedLocalVariableInspection */ [$relation, $linked] = $pdo->generateGetRelations($ktable, $this->columnsTable, $pkFirst, $alias); foreach ($relation as $colDB => $defs) { if (!isset($alias[$ktable][$colDB])) {