You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.3 KiB

Operations on relations

Operations

  • from(...rels), can use chain notation
  • left_join(left, right, ...conds), similarly for right_join, outer_join)
  • concat(...rels)
  • intersect(...rels), similarly for union
  • diff(left, right), similarly for sym_diff
  • select(rel, binding: {..})
  • where(rel, ..conds)
  • take(rel, n)
  • skip(rel, n)
  • sort(rel, expr1, expr2: sort_dir)
  • group(rel, binding: {*key1: expr1, val1: expr2}, *ordering) may order elements within groups
  • walk(pattern, ...conds, ...bindings)
  • walk_repeat(pattern, ...conds, ...bindings) every element contains additional _iter and _visited fields
  • values(data, ?Table)
  • nested_values(data, ?Table).extract(Table)
  • update(rel, Table)
  • delete(rel, Table)
  • insert(rel, Table)
  • upsert(rel, Table)

Helpers

  • print(rel)
  • print_schema(rel)
  • print_plan(rel)
  • print_optimized(rel)

Aggregation

  • Aggregation functions should implement .step() and .result()

Differentiation

  • function calls use parentheses, names start with lowercase letters or "_"
  • aggregation calls are the same as function calls except that square brackets are used instead
  • query calls are the same as function calls except that query names start with upper case or "#"