.lmq — Query | LMX

LMX // .LMQ

.lmqQuery

Read stored collections — FROM / WHERE / SELECT / ORDER BY / aggregates.

  • Needs an install
  • a .lmq file
  • free to run
WHAT IT IS

Why .lmq exists.

A read-only collection query language over the same dynamic connector /db uses, so it sees the same rows under the same rules: denied collections stay invisible, and every row is ownership-filtered for the caller. Deliberately not SQL — every gate in the tree is keyed by COLLECTION, and no raw-SQL path against leumas.db exists to hang one on. There is no write form: the host bridge has no create, update or delete method to reach.

Needs an install

Its vocabulary is a RUNNING Leumas install — your collections, your tools, your models. That is why it cannot run anonymously: with no account there is nobody for it to act as.


A WORKED EXAMPLE

What can I read, and what is in it?

The same script the engine test suite runs, so it cannot quietly stop working.

# What can I read, and what is in it?
COLLECTIONS

FROM lmx_scripts
  SELECT id, name, mode
  ORDER BY name ASC
  LIMIT 10

FROM lmx_scripts
  COUNT BY mode

1 more example

Recent saved scripts, grouped and windowed
# Recent saved scripts, grouped and windowed
FROM lmx_scripts
  WHERE createdAt > days_ago(90) AND mode IN ("lmx", "lmy", "lmq")
  SELECT id, name, mode, createdAt
  ORDER BY createdAt DESC
  LIMIT 25

FROM lmx_scripts
  WHERE name MATCHES "^demo"
  COUNT BY mode

SYNTAX

The shape of it.

Straight from the interpreter catalogue — the same summary the editor shows as a placeholder.

COLLECTIONS

FROM orders
  WHERE status IN ("paid", "shipped") AND createdAt > days_ago(30)
  SELECT id, total, plan
  ORDER BY total DESC
  LIMIT 20

NEXT

Where to take it.

Or run it against an install you already have: the CLI takes --studio <url> --token <t>.