SCHEMAXIS · Declared work. Results you can check.Documentation ↗ · Contact
schemaxis/Agent’s Hands

Documentation / generated/sqlite-operations.md
Core 11629ae · View or edit Markdown on GitHub ↗

Sqlite operation reference

Generated from the current declarations. Do not edit this file by hand.

Types, limits and defaults below describe resolved values. Runtime expressions must produce these types. Unknown options are rejected; defaults apply only when omitted. Constructor options must be constant after document composition.

Index#

summarise

summarise#

Join typed tables through a declared foreign key, optionally filter integers, then group and count/sum exact integer amounts. Choose this for reproducible relational reports and a fresh checked database. Null join keys are omitted, null values are ignored by SUM, and an all-null group has a null total.

Common mistakes and assumptions:

  • Use exact JSON integers, explicit nullability and primary/foreign keys; do not pass SQL or a pre-existing database.

Native binding: CREATE TABLE STRICT; INSERT; SELECT INNER JOIN WHERE GROUP BY COUNT SUM ORDER BY. Output kind: ["file","text"].

Inputs: none.

Option Meaning Type / constraints Default
tables Declare parent tables before children so foreign keys can name an earlier primary key. Every source is captured before native execution; 1–4 tables and up to 2048 rows each are supported. {"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40,"required":true},"source":{"type":"string","minLength":1,"maxLength":4096,"required":true},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":40,"required":true},"type":{"type":"enum","values":["INTEGER","TEXT"],"required":true},"nullable":{"type":"boolean","default":false}}},"minItems":1,"maxItems":12,"required":true},"primaryKey":{"type":"string","minLength":1,"maxLength":40,"required":true},"foreignKeys":{"type":"array","items":{"type":"object","properties":{"column":{"type":"string","minLength":1,"maxLength":40,"required":true},"table":{"type":"string","minLength":1,"maxLength":40,"required":true},"target":{"type":"string","minLength":1,"maxLength":40,"required":true}}},"maxItems":4,"default":[]}}},"minItems":1,"maxItems":4} required
from Choose the base table supplying report rows. Without join, all query columns must belong to this table; with join, both base and parent columns are available. {"type":"string","minLength":1,"maxLength":40} required
join Optionally enrich base rows with one parent table by following a declared foreign key. Omission keeps base rows alone; inner join drops null local keys and cannot multiply rows through a duplicate parent. {"type":"object","properties":{"table":{"type":"string","minLength":1,"maxLength":40,"required":true},"local":{"type":"string","minLength":1,"maxLength":40,"required":true},"remote":{"type":"string","minLength":1,"maxLength":40,"required":true}}} omitted
where Optionally keep only rows whose chosen INTEGER column is at least minimum, after joining. Omission keeps all joined rows; null filtered values do not pass. {"type":"object","properties":{"column":{"type":"string","minLength":3,"maxLength":81,"required":true},"minimum":{"type":"integer","minimum":-1000000000,"maximum":1000000000,"required":true}}} omitted
groupBy Choose 1–3 distinct qualified columns defining groups. Output names g0, g1 and g2 follow this order; binary ascending ordering places null first and distinguishes null, empty string, zero and text case. {"type":"array","items":{"type":"string","minLength":3,"maxLength":81,"required":true},"minItems":1,"maxItems":3,"uniqueItems":true} required
sum Choose a qualified INTEGER amount column to sum after joining/filtering. Null amounts are ignored; all-null groups produce null totals. row_count still includes those rows. Empty query results publish headers with zero rows. {"type":"string","minLength":3,"maxLength":81} required