RowExpression.From

Syntax

RowExpression.From(function as function) as record

About

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

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

如果无法为正文 function返回行表达式 AST,则引发错误。

此函数与 ItemExpression.From..

示例 1

返回函数 each [CustomerID] = "ALFKI"正文的 AST。

用法

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

输出

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