bindExpression<T extends Object> method
Returns a function reading the given expression from a DriftRow of this result set.
When reading expressions from many rows, calling bindExpression and then invoking the returned function for each row is faster than calling DriftRow.read on each row since types only have to be resolved once.
Implementation
T? Function(DriftRow) bindExpression<T extends Object>(Expression<T> expr) {
final position = _expressionPosition(expr);
final resolvedType = expr.sqlType.resolveIn(dialect);
return (row) => row._readAtPositionWithType(position, resolvedType);
}