db
db copied to clipboard
Yii Database Library
We can add an option like `$safeExecution = true` and method `unsafeExecute()`. When condition is empty and safe execution is enabled then an exception should be thrown.
Seems, all implementations of `ColumnInterface::dbTypecast()` checks value on `null` and `ExpressionInterface` and return it as is for those values: ```php if ($value === null || $value instanceof ExpressionInterface) { return...
### What steps will reproduce the problem? ```php $query = Product::find()->where(['id' => 1]); $query2 = Product::find()->where(['id' => 2]); $query-> union($query2); $provider = new ActiveDataProvider([ 'query' => $query, 'pagination' => [...
Similar to `IndexBy`, this option will arrange records by a value. For example ```php $userQuery = new ActiveQuery(User::class, $db); $users = $userQuery->arrangeBy('status')->all(); ``` The result is ```php [ 'active' =>...