@prisma/sqlcommenter 7.1.0-dev.37 → 7.1.0-dev.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +5 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -54,6 +54,7 @@ const prisma = new PrismaClient({
54
54
  ### First-Party Plugins
55
55
 
56
56
  - [`@prisma/sqlcommenter-query-tags`](https://www.npmjs.com/package/@prisma/sqlcommenter-query-tags): appends arbitrary tags to all queries within an async context.
57
+ - [`@prisma/sqlcommenter-trace-context`](https://www.npmjs.com/package/@prisma/sqlcommenter-trace-context): appends `traceparent` comments to SQL queries for distributed tracing.
57
58
 
58
59
  ### Query Context
59
60
 
@@ -135,11 +136,15 @@ A function that receives query context and returns key-value pairs. Return an em
135
136
  ```typescript
136
137
  interface SqlCommenterContext {
137
138
  query: SqlCommenterQueryInfo
139
+ sql?: string
138
140
  }
139
141
  ```
140
142
 
141
143
  Context provided to plugins containing information about the query.
142
144
 
145
+ - **`query`**: Information about the Prisma query being executed. See [`SqlCommenterQueryInfo`](#sqlcommenterqueryinfo).
146
+ - **`sql`**: The SQL query being executed. It is only available when using driver adapters but not when using Accelerate.
147
+
143
148
  ### `SqlCommenterQueryInfo`
144
149
 
145
150
  ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/sqlcommenter",
3
- "version": "7.1.0-dev.37",
3
+ "version": "7.1.0-dev.39",
4
4
  "description": "SQL commenter types for Prisma",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -30,7 +30,7 @@
30
30
  ],
31
31
  "sideEffects": false,
32
32
  "devDependencies": {
33
- "@prisma/json-protocol": "7.1.0-dev.37"
33
+ "@prisma/json-protocol": "7.1.0-dev.39"
34
34
  },
35
35
  "scripts": {
36
36
  "dev": "DEV=true tsx helpers/build.ts",