First steps
SakaQL is the language you use to ask questions about data and to change it in Saka. This tutorial teaches it one idea at a time, and each page builds on the ones before it.
Type along
Section titled “Type along”- Open app.saka.io and choose New → New Database.
- Press Ctrl+` to open the REPL, the console below the editor. The key is the same on macOS.
- Enter each example in the REPL and press Enter. Alt+Enter starts a new line.
Each example is one entry. To enter a longer one, copy it with the button in its corner, paste it into the REPL, and press Enter. Keep using the same database for the whole tutorial: later pages use names from earlier ones.
Try your first entry:
{1, 2, 2}The REPL answers {1, 2'2}.
Everything is a Bag
Section titled “Everything is a Bag”The braces make a Bag: a collection of Values that can repeat. 2'2 means two copies of 2. A Bag has no order.
Every expression gives a Bag, even one that holds a single number. In these pages, a comment after an example shows its result:
1 + 1 // {2}The REPL leaves out the braces when a Bag holds one Value, so here it answers 2.
Tutorial path
Section titled “Tutorial path”- Values, Bags, Records, and Sets: describe data.
- Flows, pipelines, and grouping: compute with data.
- Functions: reuse a computation with different inputs.
- Stored data and changing data: keep data in the database and change it.
- Modules: organize your code.