Sergei Tigrov

Results 52 comments of Sergei Tigrov

> > `BatchQueryResult::$value` and related methods also should have the type `array|object|null` > > It's maybe incorrect for query with one column as scalar type. This should be an array...

What is the difference of using `new SchemaCache(new FileCache(__DIR__ . '/runtime/cache'))` in the `Connection`?

Try this ```php $dataReader = $query->createCommand()->query(); // or $dataReader = $query->each(); foreach ($dataReader as $row) { ... } ```

Also `QueryDataReader` can be found in [`yiisoft/data-db`](https://github.com/yiisoft/data-db) package https://github.com/yiisoft/data-db/blob/master/src/AbstractQueryDataReader.php

There is `butchInsert()` and need `batchUpsert()`, see #92

Point 2 was solved but point 1 still actual

Related with #67 perhaps double. Looks like need `batchUpsert()` for both issues.

You can add info into log before exequte a query ```php $logger->log(LogLevel::INFO, '-- ID::carsInWay --', [$category]); $command->setSql('SELECT ...')->execute(); ```

Currently you can specify a db connection when create an `ActiveQuery` instance. ```php $userQuery = new ActiveQuery(User::class, $db); $users = $userQuery->all(); ```

Now you can define method `withConnection()` inside the model and use it to change connection. ```php $userQuery = new ActiveQuery((new User())->withConnection($db2)); $users = $userQuery->all(); ```