Log inGet started
What it does

engine_query

Resolves the engine-provided query globals the System Tools tabs read — queryEntitiesTable, queryLogsTable, getProfilingDataTable, and the like. The engine installs these on _G at boot (before the global table is sealed read-only), so the tabs read them through this one indirection rather than each touching _G directly.

The indirection is also the single override point: override / restore swap a source for a stub or a mock/replay feed without writing the sealed _G. resolve returns the override when one is set and otherwise falls through to the live engine global.

Exports

  • M.resolve(name: string) -> function? — resolve a named engine query global, honouring any active override. Returns the override function if set, else the engine _G global, else nil.
  • M.override(name: string, fn: function) — shadow an engine query global with a function until restored.
  • M.restore(name: string) — clear an override so resolve falls back to the engine global again.

Usage

local EngineQuery = require("@builtin::modules.api.editor.system_tools.engine_query")

local entities = EngineQuery.resolve("queryEntitiesTable")

-- Feed a mock during a test, then restore the live global:
EngineQuery.override("queryEntitiesTable", function() return mockRows end)
EngineQuery.restore("queryEntitiesTable")

Notes

  • Overrides are module upvalues — they live for the VM lifetime and are shared by every tab that requires this module.
  • resolve reads the live _G global via rawget each call, so an override is the only way to shadow it; the sealed _G is never written.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

This asset doesn't declare a schema or structured payload.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

0items
This part has no composite children. See the Files segment for its leaf payloads.
This part has no leaf payloads.

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.