This commit is contained in:
2022-09-20 11:17:59 +08:00
parent 41bce52883
commit 4dc55fd772
2 changed files with 23 additions and 23 deletions
+21 -21
View File
@@ -40,65 +40,65 @@ class Command extends Component
/** /**
* @return array|bool|int|string|PDOStatement|null * @return mixed
* @throws Exception * @throws Exception
*/ */
public function incrOrDecr(): array|bool|int|string|PDOStatement|null public function incrOrDecr(): mixed
{ {
return $this->execute(static::EXECUTE); return $this->execute(static::EXECUTE);
} }
/** /**
* @return int|bool|array|string|null * @return mixed
* @throws Exception * @throws Exception
*/ */
public function save(): int|bool|array|string|null public function save(): mixed
{ {
return $this->execute(static::EXECUTE); return $this->execute(static::EXECUTE);
} }
/** /**
* @return int|bool|array|string|null * @return mixed
* @throws Exception * @throws Exception
*/ */
public function all(): int|bool|array|string|null public function all(): mixed
{ {
return $this->execute(static::FETCH_ALL); return $this->execute(static::FETCH_ALL);
} }
/** /**
* @return array|bool|int|string|null * @return mixed
* @throws Exception * @throws Exception
*/ */
public function one(): null|array|bool|int|string public function one(): mixed
{ {
return $this->execute(static::FETCH); return $this->execute(static::FETCH);
} }
/** /**
* @return int|bool|array|string|null * @return mixed
* @throws Exception * @throws Exception
*/ */
public function fetchColumn(): int|bool|array|string|null public function fetchColumn(): mixed
{ {
return $this->execute(static::FETCH_COLUMN); return $this->execute(static::FETCH_COLUMN);
} }
/** /**
* @return int|bool|array|string|null * @return mixed
* @throws Exception * @throws Exception
*/ */
public function rowCount(): int|bool|array|string|null public function rowCount(): mixed
{ {
return $this->execute(static::ROW_COUNT); return $this->execute(static::ROW_COUNT);
} }
/** /**
* @return int|bool|array|string|null * @return mixed
* @throws Exception * @throws Exception
*/ */
public function flush(): int|bool|array|string|null public function flush(): mixed
{ {
return $this->execute(static::EXECUTE); return $this->execute(static::EXECUTE);
} }
@@ -106,10 +106,10 @@ class Command extends Component
/** /**
* @param string $type * @param string $type
* @return int|bool|array|string|null * @return mixed
* @throws Exception * @throws Exception
*/ */
private function execute(string $type): int|bool|array|string|null private function execute(string $type): mixed
{ {
$time = microtime(true); $time = microtime(true);
@@ -154,7 +154,7 @@ class Command extends Component
* @return array|int|bool|null * @return array|int|bool|null
* @throws Exception * @throws Exception
*/ */
private function search(string $type): array|int|bool|null private function search(string $type): mixed
{ {
$pdo = $this->db->getSlaveClient(); $pdo = $this->db->getSlaveClient();
try { try {
@@ -169,19 +169,19 @@ class Command extends Component
/** /**
* @return int|bool|array|string|null * @return mixed
* @throws Exception * @throws Exception
*/ */
public function delete(): int|bool|array|string|null public function delete(): mixed
{ {
return $this->execute(static::EXECUTE); return $this->execute(static::EXECUTE);
} }
/** /**
* @return int|bool|array|string|null * @return mixed
* @throws Exception * @throws Exception
*/ */
public function exec(): int|bool|array|string|null public function exec(): mixed
{ {
return $this->execute(static::EXECUTE); return $this->execute(static::EXECUTE);
} }
+2 -2
View File
@@ -305,11 +305,11 @@ class Db implements ISqlBuilder
/** /**
* @param string $table * @param string $table
* @param Connection|NULL $connection * @param Connection|NULL $connection
* @return bool|int|null * @return mixed
* @throws ConfigException * @throws ConfigException
* @throws Exception * @throws Exception
*/ */
public static function desc(string $table, Connection $connection = NULL): bool|int|null public static function desc(string $table, Connection $connection = NULL): mixed
{ {
$connection = static::getDefaultConnection($connection); $connection = static::getDefaultConnection($connection);