You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pass to ColumnInterface::dbTypecast() non-null and non-expression values only #960
Type casting should be fast, this is one of the bottlenecks of AR.
In current realization it is faster then it was before. It's better to first check if the value matches the expected type, and then cast it to the expected type if necessary.
Activity
Tigrov commentedon Apr 18, 2025
Any ideas how to realize it?
Type casting should be fast, this is one of the bottlenecks of AR.
In current realization it is faster then it was before. It's better to first check if the value matches the expected type, and then cast it to the expected type if necessary.
vjik commentedon Apr 18, 2025
And instead of
$column->dbTypecast($value)calldbTypecast($column, $value).samdark commentedon Apr 19, 2025
What if I need type-casting for null values?
vjik commentedon Apr 28, 2025
If such a case exists, then check only
ExpressionInterfaceTigrov commentedon Apr 29, 2025
First, needs to benchmark the current and new approaches.
samdark commentedon Sep 4, 2026
See #1197
I think that the
nullpart should be excluded. ButExpressionInterfacemakes sense. There's only one way to process it properly.samdark commentedon Sep 4, 2026
Another way to solve it is to describe it in the PHPdoc so there's at least an implicit requirement. That's actually the case right now:
samdark commentedon Sep 4, 2026
Likely a solution would be backwards incompatible.