2026-04-09 12:38:43 +02:00
|
|
|
# Example Scripts
|
|
|
|
|
|
|
|
|
|
These scripts can be executed with:
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-04-10 10:33:59 +02:00
|
|
|
make script SCRIPT=examples/scripts/ancestor.ech
|
|
|
|
|
cargo run -- script examples/scripts/ancestor.ech
|
2026-04-09 12:38:43 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Available examples:
|
|
|
|
|
|
2026-04-10 10:33:59 +02:00
|
|
|
- `ancestor.ech`: transitive closure over `Parent/2`
|
|
|
|
|
- `employee_departments.ech`: existential rule that creates labeled nulls
|
2026-04-14 10:26:36 +02:00
|
|
|
- `negation.ech`: stratified negation-as-failure with `NOT` in rule bodies
|
2026-04-10 10:33:59 +02:00
|
|
|
- `same_team.ech`: conjunctive query with a self-join
|
2026-04-14 10:26:36 +02:00
|
|
|
- `skolem_chase.ech`: Skolem chase with deterministic labeled nulls
|
|
|
|
|
- `sql_aggregate.ech`: `GROUP BY` with `COUNT`, `SUM`, `MIN`, `MAX`, and `AVG`
|
2026-04-10 10:33:59 +02:00
|
|
|
- `sql_basic.ech`: named-column filtering in the SQL frontend
|
2026-04-14 10:26:36 +02:00
|
|
|
- `sql_filter_ops.ech`: inequality, `OR`, `LIMIT`, and integer literals
|
2026-04-10 10:33:59 +02:00
|
|
|
- `sql_join.ech`: multi-table SQL join over predicate-backed tables
|
|
|
|
|
- `sql_self_join.ech`: self-join with SQL table aliases
|
|
|
|
|
- `sql_order_by.ech`: ordered SQL output with `ORDER BY`
|