RowExpression.From

语法

RowExpression.From(function as function) as record

关于

返回 function 主体的抽象语法树 (AST),规范化为行表达式:

  • 函数必须是包含 1 个参数的 lambda 函数。
  • 对函数参数的所有引用都将替换为 RowExpression.Row
  • 对列的所有引用都将替换为 RowExpression.Column(columnName)
  • AST 将简化为仅包含以下类型的节点:
    • Constant
    • Invocation
    • Unary
    • Binary
    • If
    • FieldAccess
    • NotImplemented

如果无法为 function 的主体返回行表达式 AST,则会引发错误。

示例 1

返回函数 each [CustomerID] = "ALFKI" 主体的 AST

使用情况

RowExpression.From(each [CustomerName] = "ALFKI")  

输出

[    Kind = "Binary",    Operator = "Equals",    Left = RowExpression.Column("CustomerName"),    Right =    [        Kind = "Constant",        Value = "ALFKI"    ]]

results matching ""

    No results matching ""