Module builder

Module builder 

Source
Expand description

Expression builder system for constructing AST and TypedAST nodes

This module provides a fluent API for building expression trees without duplicating type checking or validation logic. All intelligence is delegated to the existing TypedExpression::from_ast_with_context implementation.

Re-exports§

pub use command::agg_command;
pub use command::append_command;
pub use command::drop_command;
pub use command::explode_command;
pub use command::from_command;
pub use command::join_table_alias;
pub use command::join_table_reference;
pub use command::let_command;
pub use command::limit_command;
pub use command::lookup_table_alias;
pub use command::lookup_table_reference;
pub use command::match_command;
pub use command::nest_command;
pub use command::parse_command;
pub use command::pattern_quantified;
pub use command::pattern_with_alias;
pub use command::pattern_with_alias_and_quantifier;
pub use command::quantifier_any_number;
pub use command::quantifier_at_least_one;
pub use command::quantifier_exactly;
pub use command::quantifier_zero_or_one;
pub use command::rows_command;
pub use command::select_command;
pub use command::sort_command;
pub use command::table_ref;
pub use command::union_command;
pub use command::unnest_command;
pub use command::where_command;
pub use command::window_command;
pub use command::within_command;
pub use command::AggCommandBuilder;
pub use command::AppendCommandBuilder;
pub use command::DropCommandBuilder;
pub use command::ExplodeCommandBuilder;
pub use command::FromCommandBuilder;
pub use command::JoinCommandBuilder;
pub use command::LetCommandBuilder;
pub use command::LimitCommandBuilder;
pub use command::LookupCommandBuilder;
pub use command::MatchCommandBuilder;
pub use command::NestCommandBuilder;
pub use command::NoClause;
pub use command::NoIdentifiers;
pub use command::NoPattern;
pub use command::ParseCommandBuilder;
pub use command::RowsCommandBuilder;
pub use command::SelectCommandBuilder;
pub use command::SortCommandBuilder;
pub use command::UnionCommandBuilder;
pub use command::UnnestCommandBuilder;
pub use command::ValidParse;
pub use command::WhereCommandBuilder;
pub use command::WindowCommandBuilder;
pub use command::WithClause;
pub use command::WithinCommandBuilder;
pub use identifier::ident;
pub use identifier::IdentifierBuilder;
pub use pipeline::pipeline;
pub use pipeline::pipeline_from_expression;
pub use pipeline::PipelineBuilder;
pub use query::query;
pub use query::QueryBuilder;

Modules§

command
Command builder system for constructing Command AST nodes
identifier
Identifier builder for constructing simple and compound identifiers
pipeline
Pipeline builder for constructing Pipeline AST nodes
query
Query builder for constructing Query AST nodes

Structs§

ArrayLiteralBuilder
Builder for array literal expressions
BinaryOperatorBuilder
Builder for binary operators
BoolLiteralBuilder
Builder for boolean literals
CastBuilder
Builder for cast expressions (e.g., value::type)
ColumnReferenceBuilder
Builder for column reference expressions
DecimalLiteralBuilder
Builder for decimal literals
DoubleLiteralBuilder
Builder for double/float literals
ErrorBuilder
Builder for error expressions (for testing error handling)
FieldLookupBuilder
Builder for field lookup expressions (e.g., value.field)
FunctionCallBuilder
Builder for function calls
IndexAccessBuilder
Builder for index access expressions (e.g., valueindex)
IntLiteralBuilder
Builder for integer literals
IntervalLiteralBuilder
Builder for interval literals
NullLiteralBuilder
Builder for null literal
PairLiteralBuilder
Builder for pair literal expressions
StringLiteralBuilder
Builder for string literals
StructLiteralBuilder
Builder for struct literal expressions
TsTruncBuilder
Builder for timestamp truncation expressions (e.g., ts_trunc(timestamp, ‘hour’))
TupleLiteralBuilder
Builder for tuple literal expressions
UnaryPostfixOperatorBuilder
Builder for unary postfix operators
UnaryPrefixOperatorBuilder
Builder for unary prefix operators

Traits§

ExpressionBuilder
Builder for configuring expression translation options with fluent API
IntoExpressionBuilder
Trait for types that can be converted into expression builders

Functions§

add
Addition operator
and
Logical AND operator
array
at
Create a ts_trunc expression
at_day
Create a ts_trunc expression that truncates to days
at_hour
Create a ts_trunc expression that truncates to hours
at_minute
Create a ts_trunc expression that truncates to minutes
at_month
Create a ts_trunc expression that truncates to months
at_second
Create a ts_trunc expression that truncates to seconds
at_week
Create a ts_trunc expression that truncates to weeks
at_year
Create a ts_trunc expression that truncates to years
boolean
Create a boolean literal
call
Create a function call builder
cast
Create a cast expression
column_ref
Convenience function to create a column reference
days
Create a day interval
decimal
Create a decimal literal from string representation like “3.14”
decimal_from_parts
Create a decimal literal from components
divide
Division operator
double
Create a double literal
eq
Equality operator
error
Create an error expression (for testing)
field
gt
Greater than operator
gte
Greater than or equal operator
hours
Create an hour interval
in_
IN operator
index
int
Create an integer literal
interval
Create an interval literal builder
is_not_null
IS NOT NULL operator (binary operator with null literal)
is_null
IS NULL operator (binary operator with null literal)
lt
Less than operator
lte
Less than or equal operator
microseconds
Create a microsecond interval
milliseconds
Create a millisecond interval
minutes
Create a minute interval
modulo
Modulo operator
months
Create a month interval
multiply
Multiplication operator
nanoseconds
Create a nanosecond interval
ne
Inequality operator
negate
Unary negation operator
not
Unary NOT operator
null
Create a null literal
or
Logical OR operator
pair
quarters
Create a quarter interval
seconds
Create a second interval
string
Create a string literal
struct_literal
subtract
Subtraction operator
tuple
weeks
Create a week interval
years
Create a year interval