Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Design and research

ButtercupQL’s design is written down in two documents in the repository:

  • The language design says what each form means and why, and records each decision made while building it.
  • The research looks at the languages that came before it, and at how to make a query faster to write than SQL and as fast to run.

Goals

  1. Read like Python. Indentation, # comments, and Python’s own expressions and values.
  2. One step per line, in the order the data flows. Each step takes rows and gives rows.
  3. Faster to write than SQL, and never slower to run. The compiler writes the SQL a careful person would write.
  4. Compile to SQL; never replace the database.
  5. Safe by default. Every value becomes a parameter, so a query can never inject SQL, and names are checked against the schema when one is given.

Not yet

  • Writing data (insert, update, delete) and creating tables.
  • match, recursive queries, pivots, and subtracting one date from another.

The changelog lists what each version added.