Module pl

Source
Expand description

Pipelined Language AST

Abstract Syntax Tree for the first part of PRQL compiler. It can represent basic expressions, lists, pipelines, function calls & definitions, variable declarations and more.

The central struct here is Expr and its ExprKind.

Top-level construct is a list of statements Vec<Stmt>.

Structs§

Annotation
BinaryExpr
Expr
Expr is anything that has a value and thus a type. Most of these can contain other Expr themselves; literals should be ExprKind::Literal.
Func
Function called with possibly missing positional arguments. May also contain environment that is needed to evaluate the body.
FuncCall
Function call.
FuncParam
Ident
A name. Generally columns, tables, functions, variables. This is glorified way of writing a “vec with at least one element”.
ImportDef
Lineage
Represents the object that is manipulated by the pipeline transforms. Similar to a view in a database or a data frame.
LineageInput
ModuleDef
QueryDef
Stmt
TransformCall
FuncCall with better typing. Returns the modified table.
TypeDef
UnaryExpr
ValueAndUnit
VarDef

Enums§

BinOp
ExprKind
JoinSide
LineageColumn
Literal
StmtKind
TableExternRef
A reference to a table that is not in scope of this query.
TransformKind
TyOrExpr
An expression that may have already been converted to a type.
UnOp

Traits§

PlFold

Functions§

fold_column_sort
fold_column_sorts
fold_expr_kind
fold_func
fold_func_call
fold_func_param
fold_interpolate_item
fold_optional_box
fold_range
fold_stmt_kind
fold_switch_case
fold_transform_call
fold_transform_kind
fold_type
fold_type_opt
fold_var_def
fold_window
maybe_binop
new_binop
print_mem_sizes

Type Aliases§

ColumnSort
InterpolateItem
Range
SwitchCase
WindowFrame