This commit is contained in:
2020-12-24 11:12:23 +08:00
parent 5a7c7176dc
commit f18031c2c0
18 changed files with 39 additions and 39 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ namespace Database\Base;
use HttpServer\Http\Context;
use ReflectionException;
use Snowflake\Abstracts\Component;
use Snowflake\Core\JSON;
use Snowflake\Core\Json;
use Database\ActiveQuery;
use Database\ActiveRecord;
use Database\Connection;
+3 -3
View File
@@ -15,7 +15,7 @@ namespace Database\Mysql;
use Snowflake\Abstracts\Component;
use Database\Connection;
use Exception;
use Snowflake\Core\JSON;
use Snowflake\Core\Json;
/**
* Class Columns
@@ -115,7 +115,7 @@ class Columns extends Component
if ($this->isInt($format)) {
return (int)$val;
} else if ($this->isJson($format)) {
return JSON::decode($val, true);
return Json::decode($val, true);
} else if ($this->isFloat($format)) {
return (float)$val;
} else {
@@ -151,7 +151,7 @@ class Columns extends Component
if ($this->isInt($format)) {
return (int)$val;
} else if ($this->isJson($format)) {
return JSON::encode($val);
return Json::encode($val);
} else if ($this->isFloat($format)) {
return (float)$val;
} else {
+2 -2
View File
@@ -5,7 +5,7 @@ namespace Database\Orm;
use ReflectionException;
use Snowflake\Core\JSON;
use Snowflake\Core\Json;
use Snowflake\Core\Str;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake;
@@ -205,7 +205,7 @@ trait Condition
if (is_numeric($value)) {
return $value;
} else {
if (!is_null(JSON::decode($value))) {
if (!is_null(Json::decode($value))) {
return $value;
}
return '\'' . Str::encode($value) . '\'';