Repository navigation
Expressions Overview
A powerful expression language for flexible data querying and transformation. Navigate objects, filter collections, aggregate data, and more.
Property AccessName, Country?.Province?.City
FiltersOrders:where(Status = 'Done' && Total > 100)
Sorting & PagingOrders:orderBy(Total desc):limit(10)
FunctionsName:upper, Price:round(2), CreatedAt:year
AggregationsOrders:count, Orders:sum(Total), Orders:avg(Price)
Projections{Id, Name, Country.Name as Location}
Coalesce & TernaryNickname ?? Name, Status = 'Active' ? 'Yes' : 'No'
GroupByOrders:groupBy(Status).{Status, :count as Count}
Boolean FunctionsOrders:any, Orders:any(Status = 'Done'), Items:all(Qty > 0)
# Property Access
Name # Simple
Country?.Name # Null-safe
Country.Province.City # Nested
# Filters
Orders:where(Status = 'Done') # Equal
Orders:where(Total > 100 && Status = 'Active') # Multiple conditions
Orders:where(Status = 'A' || Status = 'B') # OR condition
# Sorting and paging
Orders:orderBy(Date):first # First item
Orders:orderBy(Total desc):limit(10) # Top 10
Orders:orderBy(Date):offset(20):limit(10) # Page 3 of 10
# Functions
Name:upper # String function
Price:round(2) # Math function
CreatedAt:year # Date function
Items:distinct(Category) # Collection function
# Aggregations
Orders:count # Count
Orders:sum(Total) # Sum
Orders:avg(Price) # Average
# Boolean Functions
Orders:any # Has any
Orders:any(Status = 'Done') # Any matching
Orders:all(IsValid = true) # All matching
# Projections
{Id, Name, Status} # Root projection
Orders.{Id, Total, Customer.Name} # Collection projection
{Id, Name as FullName} # With alias
{(A ?? B) as Value} # Computed
# Coalesce
Nickname ?? Name ?? 'Unknown'
# Ternary
Status = 'Active' ? 'Yes' : 'No'
# GroupBy
Orders:groupBy(Status).{Status, :count as Count}
Orders:groupBy(Year, Month).{Year, Month, :sum(Total) as Total}
-
Keywords: Case-insensitive (
groupBy,GROUPBYboth work) - Property names: Case-sensitive (must match exactly)
-
Functions: Case-insensitive (
:upper,:UPPERboth work)
- Ternary:
? : - Coalesce:
?? - Logical:
&&,|| - Comparison:
=,!=,>,< - Navigation:
. - Projection:
.{} - Function:
:
-
String:
'text'or"text" -
Number:
100,3.14,-5 -
Boolean:
true,false -
Null:
null
- The indexer
Orders[0 10 asc Date]and the filterOrders(Status = 'Done')are rejected. Use:orderBy,:offset,:limitand:where. - Text left after an expression is an error:
Name )throwsExpressionParseException. Before 5.0 it was ignored. - See the migration guide.
- Comma
,in filter equals&&(AND) -
Orders:where(A = 'x', B = 'y')=Orders:where(A = 'x' && B = 'y')
Source: https://fxmapper.net/docs/expressions/ — the website is always the most up to date version.
Introduction
Getting Started
Configuration
- Service Registration
- Entities & Profiles
- Handlers
- Pipelines
- Strongly Typed IDs
- Error Handling
- Retry Policy
- Supervisor
- Telemetry
- Kestrel (HTTP/2)
- Analyzers
Expressions
- Overview
- Property Access
- Filters, Sorting & Paging
- Functions
- Aggregations
- Projections
- Coalesce & Ternary
- GroupBy
Data Providers
Transports
Integrations
Quality
AI Assistants
Migration
Release Notes