Skip to content

Commit

Permalink
Remove AbstractDMLQueryBuilder::getTypecastValue() method (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov authored May 7, 2024
1 parent d594a8b commit 7bb36b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Enh #829: Rename `batchInsert()` to `insertBatch()` in `DMLQueryBuilderInterface` and `CommandInterface`
and change parameters from `$table, $columns, $rows` to `$table, $rows, $columns = []` (@Tigrov)
- Enh #834: Refactor `AbstractCommand::insertBatch()`, add `Quoter::getRawTableName()` to `QuoterInterface` (@Tigrov)
- Chg #836: Remove `AbstractDMLQueryBuilder::getTypecastValue()` method (@Tigrov)

## 1.3.0 March 21, 2024

Expand Down
4 changes: 4 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,7 @@ $db->createCommand()->insertBatch('user', $values)->execute();
### New methods in `QuoterInterface`

* `QuoterInterface::getRawTableName()` - returns the raw table name without quotes.

### Remove deprecated methods

- `AbstractDMLQueryBuilder::getTypecastValue()`
15 changes: 0 additions & 15 deletions src/QueryBuilder/AbstractDMLQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Yiisoft\Db\Exception\NotSupportedException;
use Yiisoft\Db\Expression\ExpressionInterface;
use Yiisoft\Db\Query\QueryInterface;
use Yiisoft\Db\Schema\ColumnSchemaInterface;
use Yiisoft\Db\Schema\QuoterInterface;
use Yiisoft\Db\Schema\SchemaInterface;

Expand Down Expand Up @@ -511,20 +510,6 @@ static function (Constraint $constraint) use ($quoter, $columns, &$columnNames):
return array_unique($columnNames);
}

/**
* @return mixed The typecast value of the given column.
*
* @deprecated will be removed in version 2.0.0
*/
protected function getTypecastValue(mixed $value, ColumnSchemaInterface $columnSchema = null): mixed
{
if ($columnSchema) {
return $columnSchema->dbTypecast($value);
}

return $value;
}

/**
* Normalizes the column names.
*
Expand Down

0 comments on commit 7bb36b2

Please sign in to comment.