Skip to content

Update pqs docs to match splice - #1446

Open
miller-da wants to merge 2 commits into
mainfrom
update-pqs-docs-to-match-splice
Open

Update pqs docs to match splice#1446
miller-da wants to merge 2 commits into
mainfrom
update-pqs-docs-to-match-splice

Conversation

@miller-da

Copy link
Copy Markdown
Contributor

Snippet L73 — argless creates() + witnesses + created_effective_at

  • Argless form: R__functions.sql:1008-1009 — create or replace function creates(qname text default null, …).
  • witnesses text[] on the contract type: V033__Implement_contracts_divulgence.sql:29 — add attribute witnesses text[] (re-added there after V011 had dropped it — which is why I checked both directions).
  • created_effective_at: V007__Expose_effective_at.sql:8-10 — alter type contract add attribute created_effective_at timestamp with time zone.
  • template_fqn: V001:24.

Snippet L85 — summary_active()

  • R__functions.sql:1101-1119 — returns setof contract_summary and its body is the aggregate the old snippet hand-rolled:
    create or replace function summary_active( "offset" … ) returns setof contract_summary
    ...
    • with stats as (select c.tpe_pk, count(*) as count from __contracts c ... group by c.tpe_pk)
    • select tpe.template_fqn, tpe.payload_type, stats.count ...
    • Columns (template_fqn, payload_type, count): V001:41-45 (create type contract_summary).

Snippet L96 — argless active() + signatories

  • Argless: R__functions.sql:1081 (qname text default null, same as above).
  • signatories text[]: V011__Remove_witnesses_add_stakeholders.sql:13 — add attribute signatories text[].

cf-docs docs-main/appdev/reference/pqs-sql-reference.mdx:30:

  • The backing tables are __contracts, __events, __exercises (double-underscore private prefix, e.g. V011:5 alter table __contracts)
  • Everything unprefixed in R__functions.sql is the served API.

Signed-off-by: miller-da <jpz.miller@pm.me>
Signed-off-by: miller-da <jpz.miller@pm.me>
@miller-da
miller-da requested a review from Jatinp26 August 23, 2026 05:51
@mintlify

mintlify Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cantonfoundation 🟢 Ready View Preview Aug 23, 2026, 5:53 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant