1 write to _info
System.Data.Common (1)
System\Data\Filter\FunctionNode.cs (1)
57
_info
= i;
58 references to _info
System.Data.Common (58)
System\Data\Filter\FunctionNode.cs (58)
61
if (
_info
< 0)
69
if (!s_funcs[
_info
]._isVariantArgumentList && _argumentCount >= s_funcs[
_info
]._argumentCount)
92
if (s_funcs[
_info
]._id == FunctionId.Convert)
123
Debug.Assert(
_info
< s_funcs.Length &&
_info
>= 0, "Invalid function info.");
127
Debug.Assert(_argumentCount == s_funcs[
_info
]._argumentCount || s_funcs[
_info
]._isVariantArgumentList, "Invalid argument argumentCount.");
130
if (s_funcs[
_info
]._id == FunctionId.Convert)
138
else if (s_funcs[
_info
]._id != FunctionId.Iif)
144
if (s_funcs[
_info
]._isValidateArguments)
146
if ((argumentValues[i] == DBNull.Value) || (typeof(object) == s_funcs[
_info
]._parameters[i]))
153
if (argumentValues[i].GetType() != s_funcs[
_info
]._parameters[i])
157
if (s_funcs[
_info
]._parameters[i] == typeof(int) && ExpressionNode.IsInteger(DataStorage.GetStorageType(argumentValues[i].GetType())))
161
else if ((s_funcs[
_info
]._id == FunctionId.Trim) || (s_funcs[
_info
]._id == FunctionId.Substring) || (s_funcs[
_info
]._id == FunctionId.Len))
165
throw ExprException.ArgumentType(s_funcs[
_info
]._name, i + 1, s_funcs[
_info
]._parameters[i]!);
170
throw ExprException.ArgumentType(s_funcs[
_info
]._name, i + 1, s_funcs[
_info
]._parameters[i]!);
176
return EvalFunction(s_funcs[
_info
]._id, argumentValues, row, version);
198
Debug.Assert(
_info
> -1, "All function nodes should be bound at this point."); // default info is -1, it means if not bounded, it should be -1, not 0!!
258
Debug.Assert(
_info
> -1, "Optimizing unbound function "); // default info is -1, it means if not bounded, it should be -1, not 0!!
260
if (s_funcs[
_info
]._id == FunctionId.In)
296
throw ExprException.ArgumentType(s_funcs[
_info
]._name, 2, typeof(Type));
321
Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[
_info
]._name} : {_argumentCount.ToString(FormatProvider)}");
329
throw ExprException.ArgumentTypeInteger(s_funcs[
_info
]._name, 1);
332
Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[
_info
]._name} : {_argumentCount.ToString(FormatProvider)}");
344
Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[
_info
]._name} : {_argumentCount.ToString(FormatProvider)}");
348
Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[
_info
]._name} : {_argumentCount.ToString(FormatProvider)}");
352
Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[
_info
]._name} : {_argumentCount.ToString(FormatProvider)}");
356
Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[
_info
]._name} : {_argumentCount.ToString(FormatProvider)}");
360
Debug.Assert(_argumentCount == 2, $"Invalid argument argumentCount for {s_funcs[
_info
]._name} : {_argumentCount.ToString(FormatProvider)}");
362
Debug.Assert(argumentValues[0] is string, $"Invalid argument type for {s_funcs[
_info
]._name}");
363
Debug.Assert(argumentValues[1] is string, $"Invalid argument type for {s_funcs[
_info
]._name}");
393
throw ExprException.NYI(s_funcs[
_info
]._name);
404
Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[
_info
]._name} : {_argumentCount.ToString(FormatProvider)}");
405
Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid argument type for {s_funcs[
_info
]._name}");
424
Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid first argument {argumentValues[0].GetType().FullName} in {s_funcs[
_info
]._name}");
425
Debug.Assert(argumentValues[1] is int, $"Invalid second argument {argumentValues[1].GetType().FullName} in {s_funcs[
_info
]._name}");
426
Debug.Assert(argumentValues[2] is int, $"Invalid third argument {argumentValues[2].GetType().FullName} in {s_funcs[
_info
]._name}");
465
Debug.Assert(_argumentCount == 1, $"Invalid argument argumentCount for {s_funcs[
_info
]._name} : {_argumentCount.ToString(FormatProvider)}");
466
Debug.Assert((argumentValues[0] is string) || (argumentValues[0] is SqlString), $"Invalid argument type for {s_funcs[
_info
]._name}");
564
throw ExprException.UndefinedFunction(s_funcs[
_info
]._name);
574
return s_funcs[
_info
]._id;
584
bool aggregate = (s_funcs[
_info
]._id == FunctionId.Sum) ||
585
(s_funcs[
_info
]._id == FunctionId.Avg) ||
586
(s_funcs[
_info
]._id == FunctionId.Min) ||
587
(s_funcs[
_info
]._id == FunctionId.Max) ||
588
(s_funcs[
_info
]._id == FunctionId.Count) ||
589
(s_funcs[
_info
]._id == FunctionId.StDev) ||
590
(s_funcs[
_info
]._id == FunctionId.Var);
597
if (
_info
< 0)
600
if (s_funcs[
_info
]._isVariantArgumentList)
603
if (_argumentCount < s_funcs[
_info
]._argumentCount)
606
if (s_funcs[
_info
]._id == FunctionId.In)
614
if (_argumentCount != s_funcs[
_info
]._argumentCount)