改名
This commit is contained in:
@@ -11,11 +11,11 @@ declare(strict_types=1);
|
|||||||
namespace Database\Mysql;
|
namespace Database\Mysql;
|
||||||
|
|
||||||
|
|
||||||
|
use Database\Connection;
|
||||||
use Database\SqlBuilder;
|
use Database\SqlBuilder;
|
||||||
|
use Exception;
|
||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
use Snowflake\Abstracts\Component;
|
use Snowflake\Abstracts\Component;
|
||||||
use Database\Connection;
|
|
||||||
use Exception;
|
|
||||||
use Snowflake\Core\Json;
|
use Snowflake\Core\Json;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -155,7 +155,11 @@ class Columns extends Component
|
|||||||
if ($this->isInt($format)) {
|
if ($this->isInt($format)) {
|
||||||
return (int)$val;
|
return (int)$val;
|
||||||
} else if ($this->isJson($format)) {
|
} else if ($this->isJson($format)) {
|
||||||
return Json::encode($val);
|
$data = Json::encode($val);
|
||||||
|
if (is_bool($data)) {
|
||||||
|
return Json::encode([]);
|
||||||
|
}
|
||||||
|
return $data;
|
||||||
} else if ($this->isFloat($format)) {
|
} else if ($this->isFloat($format)) {
|
||||||
return (float)$val;
|
return (float)$val;
|
||||||
} else {
|
} else {
|
||||||
@@ -224,7 +228,7 @@ class Columns extends Component
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $name
|
* @param string $name
|
||||||
* @return bool
|
* @return bool
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user