1 | <?php |
||
24 | class ActiveQuery extends \yii\db\ActiveQuery |
||
25 | { |
||
26 | use ClonefixTrait; |
||
27 | |||
28 | /** |
||
29 | * Executes query and returns all results as an array. If results are not found, an exception is |
||
30 | * thrown as we explicitly expect results. |
||
31 | * |
||
32 | * @param Connection $db the DB connection used to create the DB command. |
||
33 | * If null, the DB connection returned by [[modelClass]] will be used. |
||
34 | * @return array|ActiveRecord[] the query results. If the query results in nothing, an empty array will be returned. |
||
35 | * @throws RecordNotFoundException |
||
36 | */ |
||
37 | public function requireAll($db = null) |
||
51 | |||
52 | /** |
||
53 | * Executes query and returns a single result. If a result is not found, an exception is |
||
54 | * thrown as we explicitly expect a result. |
||
55 | * |
||
56 | * @param Connection|null $db the DB connection used to create the DB command. |
||
57 | * If `null`, the DB connection returned by [[modelClass]] will be used. |
||
58 | * @return ActiveRecord|array a single row of query result. Depending on the setting of [[asArray]], |
||
59 | * the query result may be either an array or an ActiveRecord object. `null` will be returned |
||
60 | * if the query results in nothing. |
||
61 | * @throws RecordNotFoundException |
||
62 | */ |
||
63 | public function requireOne($db = null) |
||
75 | |||
76 | /** |
||
77 | * @inheritdoc |
||
78 | */ |
||
79 | public function all($db = null) |
||
87 | |||
88 | /** |
||
89 | * @inheritdoc |
||
90 | */ |
||
91 | public function one($db = null) |
||
103 | |||
104 | /** |
||
105 | * @inheritdoc |
||
106 | */ |
||
107 | public function scalar($db = null) |
||
119 | |||
120 | /** |
||
121 | * @inheritdoc |
||
122 | */ |
||
123 | public function column($db = null) |
||
131 | |||
132 | /** |
||
133 | * @inheritdoc |
||
134 | */ |
||
135 | public function exists($db = null) |
||
143 | |||
144 | /** |
||
145 | * @inheritdoc |
||
146 | */ |
||
147 | protected function queryScalar($selectExpression, $db) |
||
155 | } |
||
156 |