Run a read-only SQL query
run_sqlExecute raw SQL queries against the Engine DJ library to answer questions the other tools don't cover, from custom searches to audits. Read-only enforced.
Instructions
Escape hatch for questions the other tools do not cover. Read-only is enforced by the kernel, not by this check alone. Use side.track_derived.camelot and side.track_derived.tempo in WHERE clauses rather than the camelot()/tempo() SQL functions, which run per row and defeat indexes. With more than one library connected, pass library (a uuid or path from list_libraries, either the ~/... form or the absolute one) to choose which one; the default is the supported library with the most tracks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| limit | No | ||
| params | No | ||
| library | No | Which library to use: either the uuid or the path reported by list_libraries (the reported ~/... form is accepted, as is the absolute path). Omit it to use the supported library holding the most tracks. A READ may always omit it. A WRITE may omit it only when a single supported library is connected: with two or more, a write refuses with ambiguous_library listing them, since the choice decides which disk changes; ask the user which, then pass it here. A library copied onto another drive keeps its uuid, so a uuid can name two connected libraries: a write naming such a uuid refuses with ambiguous_library as well. Pass the path to write to one of them. |