Flecs Explain Query
flecs_explain_queryExplain how FLECS parses and plans a query without returning results, revealing resolved terms, field schema, and query plan to debug queries that match nothing or too much.
Instructions
[READ] Explain how FLECS parses and plans a query, without returning results.
Returns 'query_info' (resolved terms: operator, source, traversal flags), 'field_info' (id, type and member schema per field), 'query_plan' (the FLECS query plan as text) and optionally 'query_profile'. Use it to debug queries that match nothing or match too much. Invalid queries return the FLECS parser error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Query in the FLECS query language, e.g. 'Position, Velocity'. | |
| profile | No | Also measure evaluation time and result/entity counts ('query_profile'). Evaluates the query repeatedly for up to ~1 ms. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||