docs(data-modeling): document declarative triggers via ORM SDK#190
Closed
pyramation wants to merge 9 commits into
Closed
docs(data-modeling): document declarative triggers via ORM SDK#190pyramation wants to merge 9 commits into
pyramation wants to merge 9 commits into
Conversation
Add SDK/ORM documentation for the declarative trigger catalog (db.trigger.create + db.triggerFunction.create): timing, events, forEach, transition tables (REFERENCING OLD/NEW TABLE AS), statement-level triggers, and the whenClause condition DSL. New references/triggers.md, a Triggers section in the constructive-data-modeling SKILL.md, a constructive-features router entry, and a features.md overview subsection. Repackaged affected skill zips. Documents the feature shipped in constructive-io/constructive-db#2414.
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Resolve conflicts: combine trigger + identity-column keywords in the constructive-data-modeling description; regenerate affected skill zips.
Combine FK column-list referential action keywords with the trigger keywords in the constructive-data-modeling description; regenerate the skill zip.
Combine deferrable-constraint keywords with the trigger keywords in the constructive-data-modeling description; regenerate the skill zip.
Keep both the new partial/expression index docs (main) and the Triggers section; place the index paragraph with the Indexes section. Regenerate the skill zip.
Combine exclusion-constraint keywords with the trigger keywords in the constructive-data-modeling description; regenerate the skill zip.
Keep both the new Views docs (main) and the Triggers section; combine view + trigger keywords in the description and both references rows. Regenerate zip.
Regenerate skill zip from merged directory (SKILL.md merged cleanly).
main stopped tracking generated skill .zip artifacts (now gitignored); drop the zips from this branch too. SKILL.md/views.md merged cleanly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the declarative trigger catalog (shipped in constructive-io/constructive-db#2414) as ORM SDK–only API docs, per this repo's "document the SDK surface, never raw SQL" rule. Custom triggers are now authorable via
db.triggerFunction.create+db.trigger.create— this teaches agents that surface.Authoritative home is
constructive-data-modeling(alongside constraints/indexes):references/triggers.md— full reference: two-step flow (function first, then trigger), field table (timing,events[],forEach,transitionOldName/transitionNewName,whenClause), transition tables + statement-level, and thewhenClausecondition DSL (shared withJobTrigger/EventTracker).whenClause/transition trigger phrases in the description, a "When to Apply" bullet, and a references-table row.Example documented:
Also: a router row in
constructive-features/SKILL.md, a "Custom Triggers" subsection in rootfeatures.md, and repackagedconstructive-data-modeling.zip/constructive-features.zip.Note: a trigger row without
functionNameis registration-only and is documented as not provisioned, matching the backend behavior that keeps existing catalog rows/generators unaffected.Link to Devin session: https://app.devin.ai/sessions/3876baca530b465f9aec29a94eeb413b
Requested by: @pyramation