db icon indicating copy to clipboard operation
db copied to clipboard

Yii Database Library

Results 102 db issues
Sort by recently updated
recently updated
newest added

`$columns` can be obtained 1. from `$rows` if values are associative array 2. from `$table` if table shema found 3. or generate insert without columns if no columns found Need...

```php use Yiisoft\Db\Connection\ConnectionInterface; use Yiisoft\Db\Expression\Expression; use Yiisoft\Db\Query\Query; /** * @var ConnectionInterface $database * @var string $tableName * @var string $childrenTableName */ $quoter = $database->getQuoter(); $quotedJoinColumn = $quoter->quoteTableName($tableName) . '.' ....

type:enhancement
status:under discussion

Currently enum values supported by `yiisoft/db-mysql` and `yiisoft/db-pgsql` only. For other DBMS enum values can be realized using a constraint: ```sql CHECK (enum_field IN ('value', 'another value', 'something else')) ```...

Related - #694.

type:enhancement
status:under discussion

https://github.com/yiisoft/db/blob/master/src/Query/QueryPartsInterface.php#L642 Methods like where() are often the source of problems cause sometimes these are used instead of andWhere(), orWhere(). Possible solutions: 1. Remove such methods. Add reset*() for the rare...

type:enhancement
status:under discussion

Suggestion to predefine cast methods in a separate class (e.g. `Typecast`) https://github.com/Tigrov/db-pgsql/blob/speedup_typecast_predefined/src/Typecast.php Then initialize the predefined methods in `ColumnSchema` objects https://github.com/Tigrov/db-pgsql/blob/speedup_typecast_predefined/src/Schema.php#L819 And use the predefined methods when casting values https://github.com/Tigrov/db-pgsql/blob/speedup_typecast_predefined/src/ColumnSchema.php#L84...

type:enhancement
status:ready for adoption

https://github.com/yiisoft/db/blob/c5aa0b150aa2ba176a4660049ff6d98a2a92f067/src/Constraint/Constraint.php#L18 Replace with ```php private array $columnNames = []; ``` Related with #738

https://github.com/yiisoft/db/blob/c5aa0b150aa2ba176a4660049ff6d98a2a92f067/src/Constraint/Constraint.php#L53 `object|string|null` → `Stringable|string|null`

status:ready for adoption

SQLite: ```php [['auth_item', 'child' => 'name'], ['auth_item', 'parent' => 'name']]; ``` MySQL: ```php ['auth_item_child_ibfk_1' => ['auth_item', 'child' => 'name'], 'auth_item_child_ibfk_2' => ['auth_item', 'parent' => 'name']]; ```

status:under discussion

Doctrine and Cycle support PHPs `DateTime` instances https://www.doctrine-project.org/projects/doctrine-orm/en/2.15/cookbook/working-with-datetime.html https://cycle-orm.dev/docs/advanced-datetime/current It would be great if `yiisoft/db` could support PHPs `DateTime` instances for types `timestamp`, `datetime`, `date` and `time`. ```php $command->insert('datetime_table', ['datetime'...

type:enhancement
status:ready for adoption