You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Architecture/query-insights.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ Selecting a row auto-pauses table updates. Closing a sheet that caused auto-paus
73
73
74
74
Studio's `Query` contract includes `meta.visibility`.
75
75
76
-
Postgres adapter-generated introspection, table reads, mutations, and fallback lint helper queries MUST be marked `studio-system`. Raw SQL editor executions remain user-visible. BFF hosts should append `-- prisma:studio` to system queries before forwarding them to the database so backend Query Insights implementations can filter them consistently with `-- prisma:console`.
76
+
Postgres adapter-generated introspection, table reads, mutations, and fallback lint helper queries MUST be marked `studio-system`. Raw SQL editor executions remain user-visible. BFF hosts should append `-- prisma:studio` to system queries before forwarding them to the database so backend Query Insights implementations can classify them consistently with `-- prisma:console`. System classification MUST NOT prevent successful query executions from being appended to `prisma-log`.
77
77
78
78
## ppg-dev Demo
79
79
@@ -82,7 +82,7 @@ The local `ppg-dev` demo hosts the Query Insights backend itself:
82
82
-`/api/config` advertises the Query Insights transport URLs
83
83
- ppg-dev ensures the `prisma-log` stream exists on the configured Prisma
84
84
Streams server at startup
85
-
-`/api/query` appends the Studio system suffix to system queries, executes the database request, and appends each successful user-visible SQL execution to `prisma-log`
85
+
-`/api/query` appends the Studio system suffix to system queries, executes the database request, and appends each successful SQL execution to `prisma-log` with query visibility metadata
86
86
- the Query Insights UI reads from `/api/streams/v1/stream/prisma-log`, so it
87
87
uses the same same-origin Streams proxy as the Stream view
Copy file name to clipboardExpand all lines: FEATURES.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ In that mode the shell hides schema selection, table navigation, and database-on
26
26
Embedders can provide a Query Insights transport that adds a native Studio view at `view=query-insights`.
27
27
The view reads query events from a `prisma-log` Prisma Streams stream while active, buckets event timestamps into latency and queries-per-second charts, groups Prisma operations when metadata is available, and keeps the query table sortable, filterable by table, and bounded in memory.
28
28
Selecting a row opens a Studio sheet with SQL, runtime stats, Prisma operation context, and structured recommendations after workspace-scoped AI consent.
29
-
The `ppg-dev` demo appends user-originated SQL from `/api/query` into `prisma-log` continuously through the same Streams server used by the demo, while hiding Studio system queries.
29
+
The `ppg-dev` demo appends every successful SQL execution from `/api/query` into `prisma-log` continuously through the same Streams server used by the demo, with Studio system queries annotated for downstream classification.
0 commit comments