pg-durable-sql

Installation
SKILL.md

pg_durable SQL Generation

Generate correct, idiomatic pg_durable durable function SQL using the df.* schema functions and operators.

Critical Rules

  1. All DSL expressions are TEXT. Operators and functions return JSON-encoded TEXT strings representing a function graph. Only df.start() actually executes anything.
  2. SQL strings are auto-wrapped. Plain SQL strings like 'SELECT 1' are automatically converted to SQL nodes — you do NOT need df.sql().
  3. Single-quote escaping. Each DSL node is itself a single-quoted SQL string, so any single quotes inside it must be doubled. To filter status = 'pending', write the whole node as 'SELECT * FROM orders WHERE status = ''pending''' (note the doubled quotes around pending and the closing ''').
  4. Operators are SQL-level custom operators. They work on TEXT operands. Parentheses control grouping.
  5. df.setvar() must be called BEFORE df.start(). Variables are captured at start time and are immutable during execution.
  6. Two variable syntaxes: {varname} for durable function variables (from df.setvar), $name for result captures (from |=>). Do NOT mix them up.

Operators — Complete Reference

Installs
1
GitHub Stars
1.0K
First Seen
12 days ago
pg-durable-sql — microsoft/pg_durable