HomePlaygroundExpressionsDocsDriversStatusChangelog 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 →