internal override void Bind(DataTable table, List<DataColumn> list)
{
BindTable(table);
Check();
// special case for the Convert function bind only the first argument:
// the second argument should be a Type stored as a name node, replace it with constant.
if (s_funcs[_info]._id == FunctionId.Convert)
{
if (_argumentCount != 2)
throw ExprException.FunctionArgumentCount(_name);
_arguments[0].Bind(table, list);
if (_arguments[1].GetType() == typeof(NameNode))
{
NameNode type = (NameNode)_arguments[1];
_arguments[1] = new ConstNode(table, ValueType.Str, type._name);
}
_arguments[1].Bind(table, list);
}
else
{
for (int i = 0; i < _argumentCount; i++)
{
_arguments[i].Bind(table, list);
}
}
}