@platformatic/sql-mapper 2.5.5 → 2.6.0
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.
- package/mapper.d.ts +36 -6
- package/package.json +4 -4
package/mapper.d.ts
CHANGED
|
@@ -160,6 +160,11 @@ interface Find<EntityFields> {
|
|
|
160
160
|
* If present, the entity participates in transaction
|
|
161
161
|
*/
|
|
162
162
|
tx?: Database
|
|
163
|
+
/**
|
|
164
|
+
* Passing this to all sql-mapper functions allow to apply
|
|
165
|
+
* authorization rules to the database queries (amongst other things).
|
|
166
|
+
*/
|
|
167
|
+
ctx?: PlatformaticContext
|
|
163
168
|
}): Promise<Partial<EntityFields>[]>
|
|
164
169
|
}
|
|
165
170
|
|
|
@@ -172,7 +177,12 @@ interface Count {
|
|
|
172
177
|
/**
|
|
173
178
|
* If present, the entity participates in transaction
|
|
174
179
|
*/
|
|
175
|
-
tx?: Database
|
|
180
|
+
tx?: Database,
|
|
181
|
+
/**
|
|
182
|
+
* Passing this to all sql-mapper functions allow to apply
|
|
183
|
+
* authorization rules to the database queries (amongst other things).
|
|
184
|
+
*/
|
|
185
|
+
ctx?: PlatformaticContext
|
|
176
186
|
}): Promise<number>
|
|
177
187
|
}
|
|
178
188
|
|
|
@@ -189,7 +199,12 @@ interface Insert<EntityFields> {
|
|
|
189
199
|
/**
|
|
190
200
|
* If present, the entity participates in transaction
|
|
191
201
|
*/
|
|
192
|
-
tx?: Database
|
|
202
|
+
tx?: Database,
|
|
203
|
+
/**
|
|
204
|
+
* Passing this to all sql-mapper functions allow to apply
|
|
205
|
+
* authorization rules to the database queries (amongst other things).
|
|
206
|
+
*/
|
|
207
|
+
ctx?: PlatformaticContext
|
|
193
208
|
}): Promise<Partial<EntityFields>[]>
|
|
194
209
|
}
|
|
195
210
|
|
|
@@ -206,7 +221,12 @@ interface Save<EntityFields> {
|
|
|
206
221
|
/**
|
|
207
222
|
* If present, the entity participates in transaction
|
|
208
223
|
*/
|
|
209
|
-
tx?: Database
|
|
224
|
+
tx?: Database,
|
|
225
|
+
/**
|
|
226
|
+
* Passing this to all sql-mapper functions allow to apply
|
|
227
|
+
* authorization rules to the database queries (amongst other things).
|
|
228
|
+
*/
|
|
229
|
+
ctx?: PlatformaticContext
|
|
210
230
|
}): Promise<Partial<EntityFields>>
|
|
211
231
|
}
|
|
212
232
|
|
|
@@ -223,7 +243,12 @@ interface Delete<EntityFields> {
|
|
|
223
243
|
/**
|
|
224
244
|
* If present, the entity participates in transaction
|
|
225
245
|
*/
|
|
226
|
-
tx?: Database
|
|
246
|
+
tx?: Database,
|
|
247
|
+
/**
|
|
248
|
+
* Passing this to all sql-mapper functions allow to apply
|
|
249
|
+
* authorization rules to the database queries (amongst other things).
|
|
250
|
+
*/
|
|
251
|
+
ctx?: PlatformaticContext
|
|
227
252
|
}): Promise<Partial<EntityFields>[]>,
|
|
228
253
|
}
|
|
229
254
|
|
|
@@ -236,7 +261,7 @@ interface UpdateMany<EntityFields> {
|
|
|
236
261
|
/**
|
|
237
262
|
* Entity fields to update.
|
|
238
263
|
*/
|
|
239
|
-
input: EntityFields
|
|
264
|
+
input: Partial<EntityFields>,
|
|
240
265
|
/**
|
|
241
266
|
* List of fields to be returned for each object
|
|
242
267
|
*/
|
|
@@ -244,7 +269,12 @@ interface UpdateMany<EntityFields> {
|
|
|
244
269
|
/**
|
|
245
270
|
* If present, the entity participates in transaction
|
|
246
271
|
*/
|
|
247
|
-
tx?: Database
|
|
272
|
+
tx?: Database,
|
|
273
|
+
/**
|
|
274
|
+
* Passing this to all sql-mapper functions allow to apply
|
|
275
|
+
* authorization rules to the database queries (amongst other things).
|
|
276
|
+
*/
|
|
277
|
+
ctx?: PlatformaticContext
|
|
248
278
|
}): Promise<Partial<EntityFields>[]>
|
|
249
279
|
}
|
|
250
280
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platformatic/sql-mapper",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "A data mapper utility for SQL databases",
|
|
5
5
|
"main": "mapper.js",
|
|
6
6
|
"types": "mapper.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@matteo.collina/tspl": "^0.1.1",
|
|
19
19
|
"@opentelemetry/api": "^1.8.0",
|
|
20
|
-
"borp": "^0.
|
|
20
|
+
"borp": "^0.18.0",
|
|
21
21
|
"eslint": "9",
|
|
22
22
|
"fastify": "^5.0.0",
|
|
23
23
|
"neostandard": "^0.11.1",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"camelcase": "^6.3.0",
|
|
36
36
|
"fastify-plugin": "^5.0.0",
|
|
37
37
|
"inflected": "^2.1.0",
|
|
38
|
-
"@platformatic/
|
|
39
|
-
"@platformatic/
|
|
38
|
+
"@platformatic/telemetry": "2.6.0",
|
|
39
|
+
"@platformatic/utils": "2.6.0"
|
|
40
40
|
},
|
|
41
41
|
"tsd": {
|
|
42
42
|
"directory": "test/types"
|