Repository navigation
dataset: shared SQL fragments - #180
Merged
Merged
Conversation
prs.sql and open_prs.sql each carried the non_human_identities CTE, the
touch JSON aggregate and the reviewer-touch event list. They now live once
in sql/fragments/, written at package init into /*{{name}}*/ placeholders
of every embedded sql/*.sql. Fragments neither nest nor hold -- comments;
a test checks that, no placeholder left over and no fragment unused.
Expanded queries match the old files modulo whitespace. The ready_at
expressions and the touch filters differ between the two files and stay
as they are; lead_times.sql's declared CTE carries the account kind and is
no copy.
trick77
force-pushed
the
dataset-sql-fragments
branch
from
November 19, 2026 08:48
8a64519 to
88e3512
Compare
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.
The non_human_identities CTE, the touch JSON aggregate and the reviewer-touch event list were copied between prs.sql and open_prs.sql. They now live once in sql/fragments/, written at package init into /{{name}}/ placeholders of every embedded sql/*.sql. Fragments neither nest nor hold -- comments; a test checks that, no placeholder left over and no fragment unused.
Expanded queries match the old files modulo whitespace. Not unified, because they differ: the ready_at expressions (open_prs filters to before T and tests draft as NOT = 'true', prs as = 'false') and the touch filters (opener and ready in SQL for prs, in Go for open PRs). lead_times.sql's declared CTE carries the account kind, so it is no copy.