jadpo sql
On this page
Show the SQL a query or action sends.
Print the PostgreSQL a query compiles to (area 6): its statement, then one more for each include, however many records it is included in, each with the parameters that fill it and where their values come from. Given an action, print the statement each of its writes sends, with what each refusal raises: the failure a conflict: arm names, the not-found failure or a fault. The statements are fixed when the project is compiled, so the same query always sends the same text. The project must check without errors first. --explain, which runs the query on a disposable database and shows PostgreSQL's plan, comes later.
jadpo sql [name]Arguments
name(optional): The query's or action's name
Flags
--explain: Show PostgreSQL's plan (not built yet)
On every command
--json: Print data for tools instead of text--help: Show every flag, with examples--color <when>: Choose when to use colour
jadpo sql --json writes one JSON document to standard output instead of text, with the same exit code. The document has schemaVersion, command ("sql"), ok, data (what the command produced, null when it failed) and diagnostics (each error with its rule, reason, next and help). A command that needs a terminal refuses --json and names the flags that do the same job.
Examples
# Show the statements a page query sendsjadpo sql latest_entries# Show the statements an action's writes sendjadpo sql archive_entry
Errors
cli.sql_arguments: Sql command has invalid argumentstoolchain.not_built_yet: Operation is declared but not built yettoolchain.project_not_found: Project could not be found
Markdown for agents: /docs/jadpo-sql.md.Built from Jadpo main at a707efb.