eee
This commit is contained in:
+4
-18
@@ -20,24 +20,10 @@ class ActiveQuery extends QueryTrait implements ISqlBuilder
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/** @var bool */
|
public bool $asArray = FALSE;
|
||||||
public bool $asArray = FALSE;
|
public ?Connection $db = NULL;
|
||||||
|
public array $attributes = [];
|
||||||
/** @var bool */
|
protected mixed $_mock = null;
|
||||||
public bool $useCache = FALSE;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Connection|null
|
|
||||||
*/
|
|
||||||
public ?Connection $db = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
* 参数绑定
|
|
||||||
*/
|
|
||||||
public array $attributes = [];
|
|
||||||
protected mixed $_mock = null;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -19,13 +19,6 @@ use Database\Traits\QueryTrait;
|
|||||||
class Query extends QueryTrait implements ISqlBuilder
|
class Query extends QueryTrait implements ISqlBuilder
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var SqlBuilder
|
|
||||||
*/
|
|
||||||
protected SqlBuilder $builder;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws
|
* @throws
|
||||||
*/
|
*/
|
||||||
|
|||||||
+13
-11
@@ -16,6 +16,7 @@ use Database\Base\ActiveQueryInterface;
|
|||||||
use Database\ISqlBuilder;
|
use Database\ISqlBuilder;
|
||||||
use Database\ModelInterface;
|
use Database\ModelInterface;
|
||||||
use Database\Query;
|
use Database\Query;
|
||||||
|
use Database\SqlBuilder;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Kiri;
|
use Kiri;
|
||||||
use Kiri\Abstracts\Component;
|
use Kiri\Abstracts\Component;
|
||||||
@@ -26,17 +27,18 @@ use Kiri\Abstracts\Component;
|
|||||||
*/
|
*/
|
||||||
class QueryTrait extends Component implements ActiveQueryInterface, ISqlBuilder
|
class QueryTrait extends Component implements ActiveQueryInterface, ISqlBuilder
|
||||||
{
|
{
|
||||||
protected array $where = [];
|
protected array $where = [];
|
||||||
protected array $select = [];
|
protected array $select = [];
|
||||||
protected array $join = [];
|
protected array $join = [];
|
||||||
protected array $order = [];
|
protected array $order = [];
|
||||||
protected int $offset = 0;
|
protected int $offset = 0;
|
||||||
protected int $limit = 0;
|
protected int $limit = 0;
|
||||||
protected string $group = '';
|
protected string $group = '';
|
||||||
protected string $from = '';
|
protected string $from = '';
|
||||||
protected string $alias = 't1';
|
protected string $alias = 't1';
|
||||||
protected array $filter = [];
|
protected array $filter = [];
|
||||||
protected bool $lock = false;
|
protected bool $lock = false;
|
||||||
|
protected SqlBuilder $builder;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user