HomePlaygroundExpressionsDocsDriversBlogStatusRoadmapChangelog GitHub
100% Expressions
100% DML
100% DDL

Expression Types

Expr::Named โœ“
Expr::Named("email".into())
โ†’
email
Expr::Aliased โœ“
Expr::Aliased(name, alias)
โ†’
users.email AS user_email
Expr::Aggregate โœ“
Expr::Aggregate(func, col, filter)
โ†’
COUNT(*) FILTER (WHERE ...) AS cnt
Expr::Window โœ“
Expr::Window(func, partition, order, frame)
โ†’
SUM(amount) OVER (PARTITION BY dept ORDER BY date)
Expr::Case โœ“
Expr::Case(when_clauses, else_value)
โ†’
CASE WHEN ... THEN 'A' ELSE 'B' END
Expr::ArrayConstructor NEW
Expr::ArrayConstructor(elements, alias)
โ†’
ARRAY[col1, col2] AS arr
Expr::RowConstructor NEW
Expr::RowConstructor(elements, alias)
โ†’
ROW(id, name) AS person
Expr::Subscript NEW
Expr::Subscript(expr, index, alias)
โ†’
tags[1] AS first_tag
Expr::Collate NEW
Expr::Collate(expr, collation)
โ†’
name COLLATE "C"
Expr::FieldAccess NEW
Expr::FieldAccess(expr, field, alias)
โ†’
(address).city AS city
Expr::Cast โœ“
Expr::Cast(expr, target_type)
โ†’
id::TEXT
Expr::JsonAccess โœ“
Expr::JsonAccess(column, path_segments)
โ†’
data->'user'->>'name' AS name

GROUP BY Modes

Mode Example SQL Status
GroupByMode::Simple GROUP BY a, b โœ“
GroupByMode::Rollup GROUP BY ROLLUP(a, b) โœ“
GroupByMode::Cube GROUP BY CUBE(a, b) โœ“
GroupByMode::GroupingSets GROUP BY GROUPING SETS ((a, b), (c)) NEW

DDL Actions

Action Example SQL Status
Action::Make CREATE TABLE ... โœ“
Action::Drop DROP TABLE ... โœ“
Action::Index CREATE INDEX ... โœ“
Action::CreateView CREATE VIEW ... AS SELECT NEW
Action::DropView DROP VIEW IF EXISTS ... NEW
Try in Playground โ†’ API Docs โ†’